[GRASS-SVN] r66022 - grass/trunk/scripts/v.db.addtable
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Aug 25 18:58:27 PDT 2015
Author: annakrat
Date: 2015-08-25 18:58:27 -0700 (Tue, 25 Aug 2015)
New Revision: 66022
Modified:
grass/trunk/scripts/v.db.addtable/v.db.addtable.py
Log:
v.db.addtable: fix wrong formatting code and condition
Modified: grass/trunk/scripts/v.db.addtable/v.db.addtable.py
===================================================================
--- grass/trunk/scripts/v.db.addtable/v.db.addtable.py 2015-08-26 01:54:03 UTC (rev 66021)
+++ grass/trunk/scripts/v.db.addtable/v.db.addtable.py 2015-08-26 01:58:27 UTC (rev 66022)
@@ -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