浏览代码

improved test if table exists

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@48066 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Neteler 13 年之前
父节点
当前提交
d93c14687b
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      scripts/db.droptable/db.droptable.py

+ 1 - 1
scripts/db.droptable/db.droptable.py

@@ -52,7 +52,7 @@ def main():
 
 
     # check if table exists
     # check if table exists
     nuldev = file(os.devnull, 'w')
     nuldev = file(os.devnull, 'w')
-    if not grass.db_describe(table, stdout = nuldev, stderr = nuldev):
+    if not grass.db_table_exist(table, stdout = nuldev, stderr = nuldev):
 	grass.fatal(_("Table <%s> not found in current mapset") % table)
 	grass.fatal(_("Table <%s> not found in current mapset") % table)
 
 
     # check if table is used somewhere (connected to vector map)
     # check if table is used somewhere (connected to vector map)