[GRASS-SVN] r66357 - grass/branches/releasebranch_7_0/scripts/v.db.addtable
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Sep 27 15:44:21 PDT 2015
Author: annakrat
Date: 2015-09-27 15:44:21 -0700 (Sun, 27 Sep 2015)
New Revision: 66357
Modified:
grass/branches/releasebranch_7_0/scripts/v.db.addtable/v.db.addtable.py
Log:
v.db.addtable: fix wrong formatting code and condition (merge from trunk, r66022)
Modified: grass/branches/releasebranch_7_0/scripts/v.db.addtable/v.db.addtable.py
===================================================================
--- grass/branches/releasebranch_7_0/scripts/v.db.addtable/v.db.addtable.py 2015-09-27 22:40:22 UTC (rev 66356)
+++ grass/branches/releasebranch_7_0/scripts/v.db.addtable/v.db.addtable.py 2015-09-27 22:44:21 UTC (rev 66357)
@@ -125,8 +125,8 @@
grass.fatal(_("Unable to create table <%s>") % table)
# connect the map to the DB:
- if schema is not '':
- table = '%s.%s' (schema, table)
+ if schema:
+ table = '{schema}.{table}'.format(schema=schema, table=table)
grass.run_command('v.db.connect', quiet = True,
map = map_name, database = database, driver = driver,
layer = layer, table = table, key = key)
More information about the grass-commit
mailing list