Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7228ca9

Browse files
committed
fix(cmd): fix with_stdout implementation
Admittedly this fix is solely based on the documentation providedfor this parameter, which indicated a different intend than wasactually implemented. Also I don't believe doing this will causeany harm.As a special note: the call to `open(os.devnull, 'wb')` does not seem leakthe handle, apparently it is given as-is to the subprocess, which will thenclose it naturally. This was tested using an interactive session via `htop`on osx.Fixes#437
1 parent7a8f96c commit7228ca9

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

‎doc/source/changes.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ Changelog
77

88
* Fix: progress handler exceptions are not caught anymore, which would usually just hide bugs
99
previously.
10+
* Fix: The `Git.execute` method will now redirect `stdout` to `devnull` if `with_stdout` is false,
11+
which is the intended behaviour based on the parameter's documentation.
1012

1113
2.0.2 - Fixes
1214
=============

‎git/cmd.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,7 @@ def execute(self, command,
605605
bufsize=-1,
606606
stdin=istream,
607607
stderr=PIPE,
608-
stdout=with_stdoutandPIPEorNone,
608+
stdout=with_stdoutandPIPEoropen(os.devnull,'wb'),
609609
shell=self.USE_SHELL,
610610
close_fds=(os.name=='posix'),# unsupported on windows
611611
**subprocess_kwargs

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp