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 /subcmds/sync.py | |
parent | 13657c407d0424d0866993bea39ed01094caa1c1 (diff) | |
parent | a5be53f9c809009e67f217c00b8f30246aacc237 (diff) | |
download | git-repo-608aff7f624e35348ff9fab74bad1d6921944238.tar.gz |
Merge "Use modern Python exception syntax"
Diffstat (limited to 'subcmds/sync.py')
-rw-r--r-- | subcmds/sync.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/subcmds/sync.py b/subcmds/sync.py index 90e2908f..28c154a0 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) |