[GRASS-SVN] r55005 - grass/trunk/scripts/v.db.reconnect.all

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Feb 12 01:35:20 PST 2013


Author: mmetz
Date: 2013-02-12 01:35:20 -0800 (Tue, 12 Feb 2013)
New Revision: 55005

Modified:
   grass/trunk/scripts/v.db.reconnect.all/v.db.reconnect.all.py
Log:
v.db.reconnect.all bugfix

Modified: grass/trunk/scripts/v.db.reconnect.all/v.db.reconnect.all.py
===================================================================
--- grass/trunk/scripts/v.db.reconnect.all/v.db.reconnect.all.py	2013-02-12 08:49:54 UTC (rev 55004)
+++ grass/trunk/scripts/v.db.reconnect.all/v.db.reconnect.all.py	2013-02-12 09:35:20 UTC (rev 55005)
@@ -156,6 +156,8 @@
     else:
         new_schema = default_connection['schema']
 
+    if old_database == '':
+    	old_database = None
     old_database_subst = None
     if old_database is not None:
 	old_database_subst = substitute_db(old_database)
@@ -230,10 +232,10 @@
                                           layer = layer, driver = new_driver, database = new_database,
                                           table = new_schema_table, key = key):
                     grass.warning(_("Unable to connect table <%s> to vector <%s> on layer <%s>") %
-				  (table, vect))
+				  (table, vect, str(layer)))
 
             else:
-		if database != substitute_db(new_database):
+		if database != new_database_subst:
 		    grass.warning(_("Layer <%d> will not be reconnected because "
 				    "database or schema do not match.") % layer)
 	



More information about the grass-commit mailing list