summaryrefslogtreecommitdiffstats
path: root/main.py
diff options
context:
space:
mode:
Diffstat (limited to 'main.py')
-rwxr-xr-xmain.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/main.py b/main.py
index 278fd36f..d993ee4e 100755
--- a/main.py
+++ b/main.py
@@ -146,13 +146,13 @@ class _Repo(object):
146 else: 146 else:
147 print >>sys.stderr, 'real\t%dh%dm%.3fs' \ 147 print >>sys.stderr, 'real\t%dh%dm%.3fs' \
148 % (hours, minutes, seconds) 148 % (hours, minutes, seconds)
149 except DownloadError, e: 149 except DownloadError as e:
150 print >>sys.stderr, 'error: %s' % str(e) 150 print >>sys.stderr, 'error: %s' % str(e)
151 return 1 151 return 1
152 except ManifestInvalidRevisionError, e: 152 except ManifestInvalidRevisionError as e:
153 print >>sys.stderr, 'error: %s' % str(e) 153 print >>sys.stderr, 'error: %s' % str(e)
154 return 1 154 return 1
155 except NoSuchProjectError, e: 155 except NoSuchProjectError as e:
156 if e.name: 156 if e.name:
157 print >>sys.stderr, 'error: project %s not found' % e.name 157 print >>sys.stderr, 'error: project %s not found' % e.name
158 else: 158 else:
@@ -390,14 +390,14 @@ def _Main(argv):
390 close_ssh() 390 close_ssh()
391 except KeyboardInterrupt: 391 except KeyboardInterrupt:
392 result = 1 392 result = 1
393 except RepoChangedException, rce: 393 except RepoChangedException as rce:
394 # If repo changed, re-exec ourselves. 394 # If repo changed, re-exec ourselves.
395 # 395 #
396 argv = list(sys.argv) 396 argv = list(sys.argv)
397 argv.extend(rce.extra_args) 397 argv.extend(rce.extra_args)
398 try: 398 try:
399 os.execv(__file__, argv) 399 os.execv(__file__, argv)
400 except OSError, e: 400 except OSError as e:
401 print >>sys.stderr, 'fatal: cannot restart repo after upgrade' 401 print >>sys.stderr, 'fatal: cannot restart repo after upgrade'
402 print >>sys.stderr, 'fatal: %s' % e 402 print >>sys.stderr, 'fatal: %s' % e
403 result = 128 403 result = 128