Explorar o código

db.droptable: fix it using the new behaviour of db_table_in_vector

git-svn-id: https://svn.osgeo.org/grass/grass/branches/releasebranch_7_0@62846 15284696-431f-4ddb-bdfa-cd5b030d7da7
Luca Delucchi %!s(int64=10) %!d(string=hai) anos
pai
achega
e704141de9
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      scripts/db.droptable/db.droptable.py

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

@@ -75,7 +75,7 @@ def main():
 
 
     # check if table is used somewhere (connected to vector map)
     # check if table is used somewhere (connected to vector map)
     used = grass.db.db_table_in_vector(table)
     used = grass.db.db_table_in_vector(table)
-    if len(used) > 0:
+    if used:
         grass.warning(_("Deleting table <%s> which is attached to following map(s):") % table)
         grass.warning(_("Deleting table <%s> which is attached to following map(s):") % table)
         for vect in used:
         for vect in used:
             grass.warning("%s" % vect)
             grass.warning("%s" % vect)