diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2011-01-12 17:30:11 +0100 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2011-01-12 17:45:33 +0100 |
commit | b4b50e7348815402634b6b559b48191dba00a751 (patch) | |
tree | 4b786e80409d08c26c98289dc1de20b6b3136d55 | |
parent | 460cafb81f86361536077b3b6432237c6ae3d698 (diff) | |
download | gitpython-b4b50e7348815402634b6b559b48191dba00a751.tar.gz |
OSX Signal handling: removed previous hack to fix it somehow using sleep - the error was caused by PySide which, when instantiating a QApplication, changed the signal handlers to interrupt, instead of retry operating system calls, which caused git-python to fail subsequently. signal.siginterrupt can be used to fix this behaviour after an QApplication was instatiated.
-rw-r--r-- | git/cmd.py | 1 | ||||
-rw-r--r-- | git/diff.py | 2 | ||||
-rw-r--r-- | git/util.py | 10 |
3 files changed, 1 insertions, 12 deletions
@@ -87,7 +87,6 @@ class Git(object): """Wait for the process and return its status code. :raise GitCommandError: if the return status is not 0""" - sleep_on_gui_present_osx_crashfix() status = self.proc.wait() if status != 0: raise GitCommandError(self.args, status, self.proc.stderr.read()) diff --git a/git/diff.py b/git/diff.py index c2597bd9..7b3bf6b5 100644 --- a/git/diff.py +++ b/git/diff.py @@ -11,7 +11,6 @@ from exc import GitCommandError from gitdb.util import hex_to_bin -from util import sleep_on_gui_present_osx_crashfix __all__ = ('Diffable', 'DiffIndex', 'Diff') @@ -101,7 +100,6 @@ class Diffable(object): diff_method = Diff._index_from_patch_format index = diff_method(self.repo, proc.stdout) - sleep_on_gui_present_osx_crashfix() status = proc.wait() return index diff --git a/git/util.py b/git/util.py index cbb6a66c..7cbef07f 100644 --- a/git/util.py +++ b/git/util.py @@ -21,7 +21,7 @@ from gitdb.util import ( ) __all__ = ( "stream_copy", "join_path", "to_native_path_windows", "to_native_path_linux", - "join_path_native", "sleep_on_gui_present_osx_crashfix", "Stats", "IndexFileSHA1Writer", "Iterable", "IterableList", + "join_path_native", "Stats", "IndexFileSHA1Writer", "Iterable", "IterableList", "BlockingLockFile", "LockFile", 'Actor', 'get_user_id', 'assure_directory_exists', 'RemoteProgress') @@ -100,14 +100,6 @@ def get_user_id(): # END get username from login return "%s@%s" % (username, platform.node()) -def sleep_on_gui_present_osx_crashfix(): - """This fixes a crash which appears when using pyside on OS X.""" - - #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 sys.platform == "darwin" and "PySide" in sys.modules.keys(): - time.sleep(0.1) - #} END utilities #{ Classes |