summaryrefslogtreecommitdiffstats
path: root/git_config.py
diff options
context:
space:
mode:
authorSarah Owens <sarato@inkylabs.com>2012-09-09 15:37:57 -0700
committerSarah Owens <sarato@inkylabs.com>2012-10-23 21:35:59 -0700
commita5be53f9c809009e67f217c00b8f30246aacc237 (patch)
tree7ab0da1fd31968eee882de81df8c9b93ae52fdfb /git_config.py
parent9ed12c5d9cda1f010bc173b0bc622d59e96b0dd0 (diff)
downloadgit-repo-a5be53f9c809009e67f217c00b8f30246aacc237.tar.gz
Use modern Python exception syntax
"except Exception as e" instead of "except Exception, e" This is part of a transition to supporting Python 3. Python >= 2.6 support "as" syntax. Note: this removes Python 2.5 support. Change-Id: I309599f3981bba2b46111c43102bee38ff132803
Diffstat (limited to 'git_config.py')
-rw-r--r--git_config.py6
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