summaryrefslogtreecommitdiff
path: root/lib/git/cmd.py
diff options
context:
space:
mode:
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