Merge "Use modern Python exception syntax"

This commit is contained in:
Conley Owens
2012-10-25 10:03:36 -07:00
committed by Gerrit Code Review
10 changed files with 32 additions and 32 deletions

View File

@@ -417,7 +417,7 @@ uncommitted changes are present' % project.relpath
# in the .netrc file.
print >>sys.stderr, 'No credentials found for %s in .netrc' % \
parse_result.hostname
except netrc.NetrcParseError, e:
except netrc.NetrcParseError as e:
print >>sys.stderr, 'Error parsing .netrc file: %s' % e
if (username and password):
@@ -464,11 +464,11 @@ uncommitted changes are present' % project.relpath
else:
print >>sys.stderr, 'error: %s' % manifest_str
sys.exit(1)
except (socket.error, IOError, xmlrpclib.Fault), e:
except (socket.error, IOError, xmlrpclib.Fault) as e:
print >>sys.stderr, 'error: cannot connect to manifest server %s:\n%s' % (
self.manifest.manifest_server, e)
sys.exit(1)
except xmlrpclib.ProtocolError, e:
except xmlrpclib.ProtocolError as e:
print >>sys.stderr, 'error: cannot connect to manifest server %s:\n%d %s' % (
self.manifest.manifest_server, e.errcode, e.errmsg)
sys.exit(1)