summaryrefslogtreecommitdiffstats
path: root/subcmds/sync.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 /subcmds/sync.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 'subcmds/sync.py')
-rw-r--r--subcmds/sync.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/subcmds/sync.py b/subcmds/sync.py
index e68a025e..d16605ff 100644
--- a/subcmds/sync.py
+++ b/subcmds/sync.py
@@ -417,7 +417,7 @@ uncommitted changes are present' % project.relpath
417 # in the .netrc file. 417 # in the .netrc file.
418 print >>sys.stderr, 'No credentials found for %s in .netrc' % \ 418 print >>sys.stderr, 'No credentials found for %s in .netrc' % \
419 parse_result.hostname 419 parse_result.hostname
420 except netrc.NetrcParseError, e: 420 except netrc.NetrcParseError as e:
421 print >>sys.stderr, 'Error parsing .netrc file: %s' % e 421 print >>sys.stderr, 'Error parsing .netrc file: %s' % e
422 422
423 if (username and password): 423 if (username and password):
@@ -464,11 +464,11 @@ uncommitted changes are present' % project.relpath
464 else: 464 else:
465 print >>sys.stderr, 'error: %s' % manifest_str 465 print >>sys.stderr, 'error: %s' % manifest_str
466 sys.exit(1) 466 sys.exit(1)
467 except (socket.error, IOError, xmlrpclib.Fault), e: 467 except (socket.error, IOError, xmlrpclib.Fault) as e:
468 print >>sys.stderr, 'error: cannot connect to manifest server %s:\n%s' % ( 468 print >>sys.stderr, 'error: cannot connect to manifest server %s:\n%s' % (
469 self.manifest.manifest_server, e) 469 self.manifest.manifest_server, e)
470 sys.exit(1) 470 sys.exit(1)
471 except xmlrpclib.ProtocolError, e: 471 except xmlrpclib.ProtocolError as e:
472 print >>sys.stderr, 'error: cannot connect to manifest server %s:\n%d %s' % ( 472 print >>sys.stderr, 'error: cannot connect to manifest server %s:\n%d %s' % (
473 self.manifest.manifest_server, e.errcode, e.errmsg) 473 self.manifest.manifest_server, e.errcode, e.errmsg)
474 sys.exit(1) 474 sys.exit(1)