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

Merged fd leaks fix from the master to the 0.3 version#150

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Byron merged 2 commits intogitpython-developers:0.3fromderenio:0.3
Nov 14, 2014
Merged
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletionsgit/cmd.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -73,6 +73,9 @@ def __init__(self, proc, args ):
self.args = args

def __del__(self):
self.proc.stdout.close()
self.proc.stderr.close()

# did the process finish already so we have a return code ?
if self.proc.poll() is not None:
return
Expand All@@ -84,6 +87,8 @@ def __del__(self):
# try to kill it
try:
os.kill(self.proc.pid, 2) # interrupt signal
except OSError:
pass # ignore error when process already died
except AttributeError:
# try windows
# for some reason, providing None for stdout/stderr still prints something. This is why
Expand All@@ -100,6 +105,8 @@ def wait(self):

:raise GitCommandError: if the return status is not 0"""
status = self.proc.wait()
self.proc.stdout.close()
self.proc.stderr.close()
if status != 0:
raise GitCommandError(self.args, status, self.proc.stderr.read())
# END status handling
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp