瀏覽代碼

Fix bug in db.in.ogr.py

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@33569 15284696-431f-4ddb-bdfa-cd5b030d7da7
Glynn Clements 17 年之前
父節點
當前提交
4f36cb9692
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      scripts/db.in.ogr/db.in.ogr.py

+ 2 - 2
scripts/db.in.ogr/db.in.ogr.py

@@ -100,11 +100,11 @@ def main():
 
 
     # ... and immediately drop the empty geometry
     # ... and immediately drop the empty geometry
     vectfile = grass.find_file(output, element = 'vector', mapset = mapset)['file']
     vectfile = grass.find_file(output, element = 'vector', mapset = mapset)['file']
-    if not file:
+    if not vectfile:
 	grass.fatal("Something went wrong. Should not happen")
 	grass.fatal("Something went wrong. Should not happen")
     else:
     else:
 	# remove the vector part
 	# remove the vector part
-	grass.try_remove(file)
+	grass.try_remove(vectfile)
 
 
     # get rid of superfluous auto-added cat column (and cat_ if present)
     # get rid of superfluous auto-added cat column (and cat_ if present)
     grass.run_command('db.dropcol', quiet = True, flags = 'f', table = output,
     grass.run_command('db.dropcol', quiet = True, flags = 'f', table = output,