diff test/test_xmlrpc.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 1f72b73d7770
children 64b05e24dbd8
line wrap: on
line diff
--- a/test/test_xmlrpc.py	Thu Aug 24 17:55:02 2017 -0400
+++ b/test/test_xmlrpc.py	Thu Aug 24 22:21:37 2017 -0400
@@ -60,7 +60,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
 
     def testAccess(self):
@@ -181,7 +181,7 @@
         try:
             try:
                 self.server.set('user2', 'realname=someone')
-            except Unauthorised, err:
+            except Unauthorised as err:
                 self.fail('raised %s'%err)
         finally:
             self.db.setCurrentUser('joe')
@@ -191,7 +191,7 @@
         try:
             try:
                 self.server.create('user', 'username=blah')
-            except Unauthorised, err:
+            except Unauthorised as err:
                 self.fail('raised %s'%err)
         finally:
             self.db.setCurrentUser('joe')

Roundup Issue Tracker: http://roundup-tracker.org/