diff roundup/backends/indexer_dbm.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 6e3e4f24c753
children 64c4e43fbb84
line wrap: on
line diff
--- a/roundup/backends/indexer_dbm.py	Thu Aug 24 17:55:02 2017 -0400
+++ b/roundup/backends/indexer_dbm.py	Thu Aug 24 22:21:37 2017 -0400
@@ -195,7 +195,7 @@
         for segment in segments:
             try:
                 f = open(self.indexdb + segment, 'rb')
-            except IOError, error:
+            except IOError as error:
                 # probably just nonexistent segment index file
                 if error.errno != errno.ENOENT: raise
             else:
@@ -227,7 +227,7 @@
         for segment in self.segments:
             try:
                 os.remove(self.indexdb + segment)
-            except OSError, error:
+            except OSError as error:
                 # probably just nonexistent segment index file
                 if error.errno != errno.ENOENT: raise
 

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