diff options
author | Andreas Gutsche <andreas.h.gutsche@gmail.com> | 2011-01-06 15:21:09 +0100 |
---|---|---|
committer | Andreas Gutsche <andreas.h.gutsche@gmail.com> | 2011-01-06 15:21:09 +0100 |
commit | b424f87a276e509dcaaee6beb10ca00c12bb7d29 (patch) | |
tree | 21eff20f9f86bb785837026f5ae46b2ad44e26ca /git/cmd.py | |
parent | 46f63c30e30364eb04160df71056d4d34e97af21 (diff) | |
download | gitpython-b424f87a276e509dcaaee6beb10ca00c12bb7d29.tar.gz |
Added the bugfix code as a utility function to be reused wherever this specific subprocess bug occurs.
Diffstat (limited to 'git/cmd.py')
-rw-r--r-- | git/cmd.py | 8 |
1 files changed, 2 insertions, 6 deletions
@@ -4,7 +4,7 @@ # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php -import os, sys, platform, time +import os, sys from util import * from exc import GitCommandError @@ -87,11 +87,7 @@ class Git(object): """Wait for the process and return its status code. :raise GitCommandError: if the return status is not 0""" - - #HACK: These two lines are necessary because OSX raises an error if you try to .wait() right after creating the process object. - # It is only necessary when using GUI frameworks to instantiate an application. - if platform.system().startswith("Darwin") and "pyside" in sys.modules.keys() or "PySide" in sys.modules.keys(): - time.sleep(0.1) + sleep_on_gui_present_osx_crashfix() status = self.proc.wait() if status != 0: raise GitCommandError(self.args, status, self.proc.stderr.read()) |