[Scipy-svn] r4119 - trunk/scipy/io/arff

scipy-svn@scip... scipy-svn@scip...
Tue Apr 8 16:09:55 CDT 2008


Author: rkern
Date: 2008-04-08 16:09:51 -0500 (Tue, 08 Apr 2008)
New Revision: 4119

Modified:
   trunk/scipy/io/arff/arffread.py
Log:
Avoid the 2.5 syntax of try: except: finally:

Modified: trunk/scipy/io/arff/arffread.py
===================================================================
--- trunk/scipy/io/arff/arffread.py	2008-04-08 20:08:51 UTC (rev 4118)
+++ trunk/scipy/io/arff/arffread.py	2008-04-08 21:09:51 UTC (rev 4119)
@@ -446,10 +446,11 @@
         return raw
 
     try:
-        dtline = next_data_line(ofile)
-        delim = get_delim(dtline)
-    except ValueError, e:
-        raise ParseArffError("Error while parsing delimiter: " + str(e))
+        try:
+            dtline = next_data_line(ofile)
+            delim = get_delim(dtline)
+        except ValueError, e:
+            raise ParseArffError("Error while parsing delimiter: " + str(e))
     finally:
         ofile.seek(0, 0)
         ofile = go_data(ofile)



More information about the Scipy-svn mailing list