X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=wvtest.py;h=fdb4822dc3d1b90d69fe7f2060d1d46d610fa5c5;hb=c4d3e3aebd973cdb27d3c8057db05ed7f81475b8;hp=ef03381bd0328bd8ae23476152b9bcfaf1e01b0f;hpb=f91c50493ced972865b5f3f4c595c581c58c9fde;p=bup.git diff --git a/wvtest.py b/wvtest.py index ef03381..fdb4822 100755 --- a/wvtest.py +++ b/wvtest.py @@ -122,7 +122,7 @@ if __name__ != '__main__': # we're imported as a module ''' try: func(*args, **kwargs) - except etype, e: + except etype as e: return _check(True, 'EXCEPT(%s)' % _code()) except: _check(False, 'EXCEPT(%s)' % _code()) @@ -186,7 +186,7 @@ def _runtest(fname, f): sys.stdout.flush() try: _run_in_chdir(os.path.split(mod.__file__)[0], f) - except Exception, e: + except Exception as e: print print traceback.format_exc() tb = sys.exc_info()[2]