diff options
Diffstat (limited to 'subcmds')
| -rw-r--r-- | subcmds/init.py | 2 | ||||
| -rw-r--r-- | subcmds/sync.py | 6 | ||||
| -rw-r--r-- | subcmds/upload.py | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/subcmds/init.py b/subcmds/init.py index 007667e2..b6b98076 100644 --- a/subcmds/init.py +++ b/subcmds/init.py | |||
| @@ -207,7 +207,7 @@ to update the working directory files. | |||
| 207 | 207 | ||
| 208 | try: | 208 | try: |
| 209 | self.manifest.Link(name) | 209 | self.manifest.Link(name) |
| 210 | except ManifestParseError, e: | 210 | except ManifestParseError as e: |
| 211 | print >>sys.stderr, "fatal: manifest '%s' not available" % name | 211 | print >>sys.stderr, "fatal: manifest '%s' not available" % name |
| 212 | print >>sys.stderr, 'fatal: %s' % str(e) | 212 | print >>sys.stderr, 'fatal: %s' % str(e) |
| 213 | sys.exit(1) | 213 | sys.exit(1) |
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) |
diff --git a/subcmds/upload.py b/subcmds/upload.py index 685e3420..84a5e440 100644 --- a/subcmds/upload.py +++ b/subcmds/upload.py | |||
| @@ -329,7 +329,7 @@ Gerrit Code Review: http://code.google.com/p/gerrit/ | |||
| 329 | 329 | ||
| 330 | branch.UploadForReview(people, auto_topic=opt.auto_topic, draft=opt.draft) | 330 | branch.UploadForReview(people, auto_topic=opt.auto_topic, draft=opt.draft) |
| 331 | branch.uploaded = True | 331 | branch.uploaded = True |
| 332 | except UploadError, e: | 332 | except UploadError as e: |
| 333 | branch.error = e | 333 | branch.error = e |
| 334 | branch.uploaded = False | 334 | branch.uploaded = False |
| 335 | have_errors = True | 335 | have_errors = True |
| @@ -384,7 +384,7 @@ Gerrit Code Review: http://code.google.com/p/gerrit/ | |||
| 384 | pending_proj_names = [project.name for (project, avail) in pending] | 384 | pending_proj_names = [project.name for (project, avail) in pending] |
| 385 | try: | 385 | try: |
| 386 | hook.Run(opt.allow_all_hooks, project_list=pending_proj_names) | 386 | hook.Run(opt.allow_all_hooks, project_list=pending_proj_names) |
| 387 | except HookError, e: | 387 | except HookError as e: |
| 388 | print >>sys.stderr, "ERROR: %s" % str(e) | 388 | print >>sys.stderr, "ERROR: %s" % str(e) |
| 389 | return | 389 | return |
| 390 | 390 | ||
