File tree 1 file changed +6
-1
lines changed
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 4
4
# This module is part of GitPython and is released under
5
5
# the BSD License: http://www.opensource.org/licenses/bsd-license.php
6
6
7
- import os , sys
7
+ import os , sys , platform , time
8
8
from util import *
9
9
from exc import GitCommandError
10
10
@@ -87,6 +87,11 @@ def wait(self):
87
87
"""Wait for the process and return its status code.
88
88
89
89
:raise GitCommandError: if the return status is not 0"""
90
+
91
+ #HACK: These two lines are necessary because OSX raises an error if you try to .wait() right after creating the process object.
92
+ # It is only necessary when using GUI frameworks to instantiate an application.
93
+ if platform .system ().startswith ("Darwin" ) and "pyside" in sys .modules .keys () or "PySide" in sys .modules .keys ():
94
+ time .sleep (0.1 )
90
95
status = self .proc .wait ()
91
96
if status != 0 :
92
97
raise GitCommandError (self .args , status , self .proc .stderr .read ())
You can’t perform that action at this time.
0 commit comments