summaryrefslogtreecommitdiff
path: root/lib/git/cmd.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2010-05-11 11:01:45 +0200
committerSebastian Thiel <byronimo@gmail.com>2010-05-12 15:56:50 +0200
commit600fcbc1a2d723f8d51e5f5ab6d9e4c389010e1c (patch)
tree2be1a6f54390e18bc7b6c2318eae23e700c96df6 /lib/git/cmd.py
parent8caeec1b15645fa53ec5ddc6e990e7030ffb7c5a (diff)
downloadgitpython-600fcbc1a2d723f8d51e5f5ab6d9e4c389010e1c.tar.gz
Repo: Added comparison operators and hash operator including test
Cmd: AutoInterrupt handles boundary cases more gracefully as it can be that the os module suddenly becomes None if the interpreter is going down
Diffstat (limited to 'lib/git/cmd.py')
-rw-r--r--lib/git/cmd.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/git/cmd.py b/lib/git/cmd.py
index 60912142..254b7dd3 100644
--- a/lib/git/cmd.py
+++ b/lib/git/cmd.py
@@ -63,8 +63,12 @@ class Git(object):
def __del__(self):
# did the process finish already so we have a return code ?
if self.proc.poll() is not None:
- return
-
+ return
+
+ # can be that nothing really exists anymore ...
+ if os is None:
+ return
+
# try to kill it
try:
os.kill(self.proc.pid, 2) # interrupt signal