diff options
Diffstat (limited to 'lib/git/remote.py')
-rw-r--r-- | lib/git/remote.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/git/remote.py b/lib/git/remote.py index 9141fc3b..b1c90bd5 100644 --- a/lib/git/remote.py +++ b/lib/git/remote.py @@ -607,8 +607,11 @@ class Remote(LazyMixin, Iterable): # END for each line try: proc.wait() - except GitCommandError: + except GitCommandError,e: # if a push has rejected items, the command has non-zero return status + # a return status of 128 indicates a connection error - reraise the previous one + if proc.poll() == 128: + raise pass # END exception handling return output |