File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 44# This module is part of GitPython and is released under
55# the BSD License: http://www.opensource.org/licenses/bsd-license.php
66
7- import os , sys
7+ import os , sys , platform , time
88from util import *
99from exc import GitCommandError
1010
@@ -87,6 +87,11 @@ def wait(self):
8787 """Wait for the process and return its status code.
8888
8989 :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 )
9095 status = self .proc .wait ()
9196 if status != 0 :
9297 raise GitCommandError (self .args , status , self .proc .stderr .read ())
You can’t perform that action at this time.
0 commit comments