[GRASS-SVN] r35209 -
grass/branches/develbranch_6/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Jan 4 13:35:36 EST 2009
Author: martinl
Date: 2009-01-04 13:35:36 -0500 (Sun, 04 Jan 2009)
New Revision: 35209
Modified:
grass/branches/develbranch_6/gui/wxpython/gui_modules/gselect.py
Log:
revert r35208: please note that wxGUI in develbranch_6 differs from
code in releasebranch_6_4 !
Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/gselect.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/gselect.py 2009-01-04 18:32:41 UTC (rev 35208)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/gselect.py 2009-01-04 18:35:36 UTC (rev 35209)
@@ -486,21 +486,18 @@
def InsertTables(self, driver=None, database=None):
"""Insert attribute tables into combobox"""
items = []
- cmd = ['db.tables',
- '-p']
- if driver:
- cmd.append('driver=%s' % driver)
- if database:
- cmd.append('database=%s' % database)
+ tableCmd = None
+ ret = gcmd.RunCommand('db.tables',
+ parent = self,
+ read = True,
+ flags = 'p',
+ driver = driver,
+ database = database)
- try:
- tableCmd = gcmd.Command(cmd)
- except gcmd.CmdError:
+ if ret == None:
tableCmd = None
-
- if tableCmd and \
- tableCmd.returncode == 0:
- for table in tableCmd.ReadStdOutput():
+ else:
+ for table in ret.split('\n'):
items.append(table)
self.SetItems(items)
More information about the grass-commit
mailing list