changeset 33875:1378c971ec5d

tests: stop using old except syntax in test-bundle2-format
author Augie Fackler <raf@durin42.com>
date Tue, 22 Aug 2017 15:05:07 -0400
parents 3b1add641232
children 998fad4b3072
files tests/test-bundle2-format.t
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-bundle2-format.t	Tue Aug 22 14:57:52 2017 -0400
+++ b/tests/test-bundle2-format.t	Tue Aug 22 15:05:07 2017 -0400
@@ -89,7 +89,7 @@
   >         p = p.split('=', 1)
   >         try:
   >             bundler.addparam(*p)
-  >         except ValueError, exc:
+  >         except ValueError as exc:
   >             raise error.Abort('%s' % exc)
   > 
   >     if opts['compress']:
@@ -164,7 +164,7 @@
   >     try:
   >         for chunk in bundler.getchunks():
   >             file.write(chunk)
-  >     except RuntimeError, exc:
+  >     except RuntimeError as exc:
   >         raise error.Abort(exc)
   >     finally:
   >         file.flush()
@@ -180,9 +180,9 @@
   >             unbundler = bundle2.getunbundler(ui, sys.stdin)
   >             op = bundle2.processbundle(repo, unbundler, lambda: tr)
   >             tr.close()
-  >         except error.BundleValueError, exc:
+  >         except error.BundleValueError as exc:
   >             raise error.Abort('missing support for %s' % exc)
-  >         except error.PushRaced, exc:
+  >         except error.PushRaced as exc:
   >             raise error.Abort('push race: %s' % exc)
   >     finally:
   >         if tr is not None:
@@ -206,7 +206,7 @@
   >     unbundler = bundle2.getunbundler(ui, sys.stdin)
   >     try:
   >         params = unbundler.params
-  >     except error.BundleValueError, exc:
+  >     except error.BundleValueError as exc:
   >        raise error.Abort('unknown parameters: %s' % exc)
   >     ui.write('options count: %i\n' % len(params))
   >     for key in sorted(params):