Commits

zubin71 committed 63057ac

ran 2to3 on test_configobj

Comments (0)

Files changed (1)

test_configobj.py

 # http://lists.sourceforge.net/lists/listinfo/configobj-develop
 # Comments, suggestions and bug reports welcome.
 
-from __future__ import generators
-from StringIO import StringIO
+
+from io import StringIO
 
 import os
 import sys
         length = None
         try:
             ConfigObj(testconfig4.split('\n'))
-        except ConfigObjError, e:
+        except ConfigObjError as e:
             length=len(e.errors)
         self.assertEquals(length, 4)
         
         length=None
         try:
             ConfigObj(testconfig5.split('\n'))
-        except ConfigObjError, e:
+        except ConfigObjError as e:
             length=len(e.errors)
         self.assertEquals(length, 4)
             
         
         try:
             c = ConfigObj(bad_syntax)
-        except Exception, e:
+        except Exception as e:
             pass
             
         self.assertTrue(isinstance(e, ConfigObjError))
         
         try:
             c = ConfigObj(bad_syntax, unrepr=True)
-        except Exception, e:
+        except Exception as e:
             pass
         self.assertTrue(isinstance(e, ConfigObjError))
         self.assertTrue(str(e), 'Parse error in value at line 3.')
         
         try:
             c = ConfigObj(multiple_bad_syntax)
-        except Exception, e:
+        except Exception as e:
             pass
         self.assertEquals(str(e), 'Parsing failed with several errors.\nFirst error at line 3.')
           
         
         try:
             c = ConfigObj(multiple_bad_syntax)
-        except Exception, e:
+        except Exception as e:
             pass
             
         self.assertTrue(isinstance(e, ConfigObjError))
 
         try:
             c = ConfigObj(multiple_bad_syntax, unrepr=True)
-        except Exception, e:
+        except Exception as e:
             pass
         self.assertTrue(isinstance(e, ConfigObjError))
         self.assertEquals(str(e), "Parsing failed with several errors.\nFirst error at line 3.")