Jelajahi Sumber

don't trust the system to close the file for us on error

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@40353 15284696-431f-4ddb-bdfa-cd5b030d7da7
Hamish Bowman 15 tahun lalu
induk
melakukan
224a7f5072
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      scripts/v.in.lines/v.in.lines.py

+ 1 - 1
scripts/v.in.lines/v.in.lines.py

@@ -135,9 +135,9 @@ def main():
             continue
         numcols = len(line.split())
         break
+    inf.close()
     if (do3D and numcols < 3) or (not do3D and numcols < 2):
         grass.fatal(_("Not enough data columns. (incorrect fs setting?)"))
-    inf.close()
 
 
     grass.run_command('v.in.mapgen', flags = 'f' + do3D,