summaryrefslogtreecommitdiff
path: root/git/util.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2011-01-06 15:23:22 +0100
committerSebastian Thiel <byronimo@gmail.com>2011-01-06 15:23:22 +0100
commit1ab169407354d4b9512447cd9c90e8a31263c275 (patch)
treef757fb9563689031bde22652d06329adfa8f1b5d /git/util.py
parent56488ced0fae2729b1e9c72447b005efdcd4fea7 (diff)
parentb424f87a276e509dcaaee6beb10ca00c12bb7d29 (diff)
downloadgitpython-1ab169407354d4b9512447cd9c90e8a31263c275.tar.gz
Merge remote branch 'ahgutsche/master'
Diffstat (limited to 'git/util.py')
-rw-r--r--git/util.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/git/util.py b/git/util.py
index 8c0b6697..f81e3741 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", "Stats", "IndexFileSHA1Writer", "Iterable", "IterableList",
+ "join_path_native", "sleep_on_gui_present_osx_crashfix", "Stats", "IndexFileSHA1Writer", "Iterable", "IterableList",
"BlockingLockFile", "LockFile", 'Actor', 'get_user_id', 'assure_directory_exists',
'RemoteProgress')
@@ -101,6 +101,14 @@ 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 platform.system().startswith("Darwin") and "PySide" in sys.modules.keys():
+ time.sleep(0.1)
+
#} END utilities
#{ Classes