|
16 | 16 |
|
17 | 17 | # NOTE: Some of the unused imports might be used/imported by others.
|
18 | 18 | # Handle once test-cases are back up and running.
|
19 |
| -from .exc import ( |
20 |
| - GitCommandError, |
21 |
| - InvalidGitRepositoryError |
22 |
| -) |
| 19 | +from .exc import InvalidGitRepositoryError |
23 | 20 |
|
24 | 21 | from .compat import (
|
25 | 22 | MAXSIZE,
|
@@ -154,32 +151,7 @@ def get_user_id():
|
154 | 151 |
|
155 | 152 | def finalize_process(proc):
|
156 | 153 | """Wait for the process (clone, fetch, pull or push) and handle its errors accordingly"""
|
157 |
| - try: |
158 |
| - proc.wait() |
159 |
| - except GitCommandError: |
160 |
| - # if a push has rejected items, the command has non-zero return status |
161 |
| - # a return status of 128 indicates a connection error - reraise the previous one |
162 |
| - # Everything else will still be parsed and made available through PushInfo flags |
163 |
| - # Estimated error results look like this: |
164 |
| - # ```bash |
165 |
| - # To /var/folders/xp/m48gs2tx2vg95tmtzw7tprs40000gn/T/tmpk5jeBeremote_repo_test_base |
166 |
| - # ! refs/heads/master:refs/heads/master [rejected] (non-fast-forward) |
167 |
| - # Done |
168 |
| - # error: failed to push some refs to |
169 |
| - # '/var/folders/xp/m48gs2tx2vg95tmtzw7tprs40000gn/T/tmpk5jeBeremote_repo_test_base' |
170 |
| - # hint: Updates were rejected because the tip of your current branch is behind |
171 |
| - # hint: its remote counterpart. Integrate the remote changes (e.g. |
172 |
| - # hint: 'git pull ...') before pushing again. |
173 |
| - # hint: See the 'Note about fast-forwards' in 'git push --help' for details. |
174 |
| - # ``` |
175 |
| - # See https://github.com/gitpython-developers/GitPython/blob/master/git/test/test_remote.py#L305 |
176 |
| - # on how to check for these kinds of errors. |
177 |
| - # Also see this issue for a reason for this verbosity: |
178 |
| - # https://github.com/gitpython-developers/GitPython/issues/271 |
179 |
| - if proc.poll() == 128: |
180 |
| - raise |
181 |
| - pass |
182 |
| - # END exception handling |
| 154 | + proc.wait() |
183 | 155 |
|
184 | 156 | #} END utilities
|
185 | 157 |
|
|
0 commit comments