diff options
author | Conley Owens <cco3@android.com> | 2012-10-25 10:03:36 -0700 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2012-10-25 10:03:37 -0700 |
commit | 608aff7f624e35348ff9fab74bad1d6921944238 (patch) | |
tree | e1bdbb8af5927dd226d8e22dc382fd24c4cdfa5e /git_config.py | |
parent | 13657c407d0424d0866993bea39ed01094caa1c1 (diff) | |
parent | a5be53f9c809009e67f217c00b8f30246aacc237 (diff) | |
download | git-repo-608aff7f624e35348ff9fab74bad1d6921944238.tar.gz |
Merge "Use modern Python exception syntax"
Diffstat (limited to 'git_config.py')
-rw-r--r-- | git_config.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/git_config.py b/git_config.py index afaa6f15..ae288558 100644 --- a/git_config.py +++ b/git_config.py | |||
@@ -449,7 +449,7 @@ def _open_ssh(host, port=None): | |||
449 | try: | 449 | try: |
450 | Trace(': %s', ' '.join(command)) | 450 | Trace(': %s', ' '.join(command)) |
451 | p = subprocess.Popen(command) | 451 | p = subprocess.Popen(command) |
452 | except Exception, e: | 452 | except Exception as e: |
453 | _ssh_master = False | 453 | _ssh_master = False |
454 | print >>sys.stderr, \ | 454 | print >>sys.stderr, \ |
455 | '\nwarn: cannot enable ssh control master for %s:%s\n%s' \ | 455 | '\nwarn: cannot enable ssh control master for %s:%s\n%s' \ |
@@ -592,9 +592,9 @@ class Remote(object): | |||
592 | else: | 592 | else: |
593 | host, port = info.split() | 593 | host, port = info.split() |
594 | self._review_url = self._SshReviewUrl(userEmail, host, port) | 594 | self._review_url = self._SshReviewUrl(userEmail, host, port) |
595 | except urllib2.HTTPError, e: | 595 | except urllib2.HTTPError as e: |
596 | raise UploadError('%s: %s' % (self.review, str(e))) | 596 | raise UploadError('%s: %s' % (self.review, str(e))) |
597 | except urllib2.URLError, e: | 597 | except urllib2.URLError as e: |
598 | raise UploadError('%s: %s' % (self.review, str(e))) | 598 | raise UploadError('%s: %s' % (self.review, str(e))) |
599 | 599 | ||
600 | REVIEW_CACHE[u] = self._review_url | 600 | REVIEW_CACHE[u] = self._review_url |