Mercurial > p > roundup > code
diff test/db_test_base.py @ 5248:198b6e810c67
Use Python-3-compatible 'as' syntax for except statements
Many raise statements near these are also fixed.
So are two ivorrect file encoding marks ('utf8'->'utf-8').
| author | Eric S. Raymond <esr@thyrsus.com> |
|---|---|
| date | Thu, 24 Aug 2017 22:21:37 -0400 |
| parents | 9886917c8545 |
| children | 53a853c06e9a |
line wrap: on
line diff
--- a/test/db_test_base.py Thu Aug 24 17:55:02 2017 -0400 +++ b/test/db_test_base.py Thu Aug 24 22:21:37 2017 -0400 @@ -56,7 +56,7 @@ global config try: shutil.rmtree(dirname) - except OSError, error: + except OSError as error: if error.errno not in (errno.ENOENT, errno.ESRCH): raise # create the instance init.install(dirname, os.path.join(os.path.dirname(__file__), @@ -2934,7 +2934,7 @@ self.dirname = '_test_init_%s'%self.count try: shutil.rmtree(self.dirname) - except OSError, error: + except OSError as error: if error.errno not in (errno.ENOENT, errno.ESRCH): raise def tearDown(self): @@ -2942,7 +2942,7 @@ self.db.close() try: shutil.rmtree(self.dirname) - except OSError, error: + except OSError as error: if error.errno not in (errno.ENOENT, errno.ESRCH): raise class ClassicInitTest(ClassicInitBase):
