[GRASS-SVN] r54778 - grass/trunk/scripts/db.droptable
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Jan 26 14:34:43 PST 2013
Author: mmetz
Date: 2013-01-26 14:34:42 -0800 (Sat, 26 Jan 2013)
New Revision: 54778
Modified:
grass/trunk/scripts/db.droptable/db.droptable.py
Log:
db.droptable bug fixes
Modified: grass/trunk/scripts/db.droptable/db.droptable.py
===================================================================
--- grass/trunk/scripts/db.droptable/db.droptable.py 2013-01-26 17:26:09 UTC (rev 54777)
+++ grass/trunk/scripts/db.droptable/db.droptable.py 2013-01-26 22:34:42 UTC (rev 54778)
@@ -60,7 +60,7 @@
else:
database = kv['database']
if options['driver']:
- driver = kv['driver']
+ driver = options['driver']
else:
driver = kv['driver']
# schema needed for PG?
@@ -70,7 +70,7 @@
# check if table exists
nuldev = file(os.devnull, 'w')
- if not grass.db_table_exist(table, stdout = nuldev, stderr = nuldev):
+ if not grass.db_table_exist(table):
grass.fatal(_("Table <%s> not found in database <%s>") % \
(table, database))
@@ -84,10 +84,10 @@
if f['table'] == table:
used.append(vect)
break
- if used:
+ if len(used) > 0:
grass.warning(_("Deleting table <%s> which is attached to following map(s):") % table)
for vect in used:
- grass.message(vect)
+ grass.warning("%s" % vect)
if not force:
grass.message(_("The table <%s> would be deleted.") % table)
More information about the grass-commit
mailing list