Commits

David Jean Louis committed 079d804

Fixed broken python3 support

Comments (0)

Files changed (1)

         try:
             po = polib.pofile(data)
             self.fail("Unescaped quote not detected")
-        except IOError, exc:
+        except IOError:
+            exc = sys.exc_info()[1]
             msg = 'Syntax error in po file None (line 3): unescaped double quote found'
             self.assertEqual(str(exc), msg)
 
         try:
             po = polib.pofile(data)
             self.fail("Unescaped quote not detected")
-        except IOError, exc:
+        except IOError:
+            exc = sys.exc_info()[1]
             msg = 'Syntax error in po file None (line 4): unescaped double quote found'
             self.assertEqual(str(exc), msg)
 
         try:
             po = polib.pofile(data)
             self.fail("Unescaped quote not detected")
-        except IOError, exc:
+        except IOError:
+            exc = sys.exc_info()[1]
             msg = 'Syntax error in po file None (line 3): unescaped double quote found'
+            self.assertEqual(str(exc), msg)
 
     def test_unescaped_double_quote4(self):
         """
         try:
             po = polib.pofile(data)
             self.fail("Unescaped quote not detected")
-        except IOError, exc:
+        except IOError:
+            exc = sys.exc_info()[1]
             msg = 'Syntax error in po file None (line 4): unescaped double quote found'
             self.assertEqual(str(exc), msg)