X-Git-Url: https://arthur.barton.de/gitweb/?a=blobdiff_plain;f=wvtest.py;h=fdb4822dc3d1b90d69fe7f2060d1d46d610fa5c5;hb=3872c5c79d60ff7a5b4a48dac055447dc8c257aa;hp=1c2981e9be31975fe58aa2bd7d85fa2a581ea0b6;hpb=cbba3f22b687cac8c1a96f79c9f16965c455faea;p=bup.git diff --git a/wvtest.py b/wvtest.py index 1c2981e..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] @@ -226,4 +226,5 @@ if __name__ == '__main__': import wvtest as _wvtestmod sys.modules['wvtest'] = _wvtestmod sys.modules['wvtest.wvtest'] = _wvtestmod + wvtest = _wvtestmod wvtest_main(sys.argv[1:])