]> arthur.barton.de Git - bup.git/blobdiff - lib/bup/t/thelpers.py
Use Python 3 compatible "except ... as e" syntax
[bup.git] / lib / bup / t / thelpers.py
index 10ebce1b2c6bdb4f3f5ceca1c5075afeefbe733e..ee8df5103e6238c71f11832ca2fec3fd47ee19bf 100644 (file)
@@ -121,7 +121,7 @@ def test_readpipe():
     WVPASSEQ(x, '42\n')
     try:
         readpipe(['bash', '-c', 'exit 42'])
-    except Exception, ex:
+    except Exception as ex:
         WVPASSEQ(str(ex), "subprocess 'bash -c exit 42' failed with status 42")
 
 
@@ -135,7 +135,7 @@ def test_batchpipe():
     WVPASSEQ(out, '42\n')
     try:
         batchpipe(['bash', '-c'], ['exit 42'])
-    except Exception, ex:
+    except Exception as ex:
         WVPASSEQ(str(ex), "subprocess 'bash -c exit 42' failed with status 42")
     args = [str(x) for x in range(6)]
     # Force batchpipe to break the args into batches of 3.  This