diff options
| author | Conley Owens <cco3@android.com> | 2013-05-28 16:56:59 +0000 |
|---|---|---|
| committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2013-05-28 16:56:59 +0000 |
| commit | a1f77d92c65028a55202062594cb379b6503bf60 (patch) | |
| tree | afacb5f228f4bf005afd044fce188714bf39a8dc | |
| parent | f609f91b72c0b90026da0eefcc0f52f12840971b (diff) | |
| parent | ecf8f2b7c8e68ee78c5a90ecd8a9b48e73195b80 (diff) | |
| download | git-repo-a1f77d92c65028a55202062594cb379b6503bf60.tar.gz | |
Merge "Handle HTTPException when attempting to get ssh_info"
| -rw-r--r-- | git_config.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/git_config.py b/git_config.py index 431cd457..2270200c 100644 --- a/git_config.py +++ b/git_config.py | |||
| @@ -40,6 +40,10 @@ else: | |||
| 40 | from signal import SIGTERM | 40 | from signal import SIGTERM |
| 41 | from error import GitError, UploadError | 41 | from error import GitError, UploadError |
| 42 | from trace import Trace | 42 | from trace import Trace |
| 43 | if is_python3(): | ||
| 44 | from http.client import HTTPException | ||
| 45 | else: | ||
| 46 | from httplib import HTTPException | ||
| 43 | 47 | ||
| 44 | from git_command import GitCommand | 48 | from git_command import GitCommand |
| 45 | from git_command import ssh_sock | 49 | from git_command import ssh_sock |
| @@ -608,6 +612,8 @@ class Remote(object): | |||
| 608 | raise UploadError('%s: %s' % (self.review, str(e))) | 612 | raise UploadError('%s: %s' % (self.review, str(e))) |
| 609 | except urllib.error.URLError as e: | 613 | except urllib.error.URLError as e: |
| 610 | raise UploadError('%s: %s' % (self.review, str(e))) | 614 | raise UploadError('%s: %s' % (self.review, str(e))) |
| 615 | except HTTPException as e: | ||
| 616 | raise UploadError('%s: %s' % (self.review, e.__class__.__name__)) | ||
| 611 | 617 | ||
| 612 | REVIEW_CACHE[u] = self._review_url | 618 | REVIEW_CACHE[u] = self._review_url |
| 613 | return self._review_url + self.projectname | 619 | return self._review_url + self.projectname |
