[GRASS-SVN] r66900 - grass/trunk/scripts/db.in.ogr

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Nov 23 06:05:30 PST 2015


Author: martinl
Date: 2015-11-23 06:05:30 -0800 (Mon, 23 Nov 2015)
New Revision: 66900

Modified:
   grass/trunk/scripts/db.in.ogr/db.in.ogr.py
Log:
db.in.ogr: cosmetics when db connection is not defined

Modified: grass/trunk/scripts/db.in.ogr/db.in.ogr.py
===================================================================
--- grass/trunk/scripts/db.in.ogr/db.in.ogr.py	2015-11-23 13:50:54 UTC (rev 66899)
+++ grass/trunk/scripts/db.in.ogr/db.in.ogr.py	2015-11-23 14:05:30 UTC (rev 66900)
@@ -80,7 +80,9 @@
 
     # check if table exists
     try:
-        s = grass.read_command('db.tables', flags = 'p', quiet=True)
+        nuldev = file(os.devnull, 'w+')
+        s = grass.read_command('db.tables', flags = 'p', quiet=True, stderr=nuldev)
+        nuldev.close()
     except CalledModuleError:
         # check connection parameters, set if uninitialized
         grass.read_command('db.connect', flags='c')



More information about the grass-commit mailing list