[GRASS-SVN] r62277 - in grass/branches/releasebranch_7_0: . gui/wxpython/gui_core
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Oct 17 08:15:34 PDT 2014
Author: annakrat
Date: 2014-10-17 08:15:34 -0700 (Fri, 17 Oct 2014)
New Revision: 62277
Modified:
grass/branches/releasebranch_7_0/
grass/branches/releasebranch_7_0/gui/wxpython/gui_core/query.py
Log:
wxGUI/query: convert to string only when necessary (merge from trunk, r62276)
Property changes on: grass/branches/releasebranch_7_0
___________________________________________________________________
Modified: svn:mergeinfo
- /grass/trunk:61280,62144,62269,62271
+ /grass/trunk:61280,62144,62269,62271,62276
Modified: grass/branches/releasebranch_7_0/gui/wxpython/gui_core/query.py
===================================================================
--- grass/branches/releasebranch_7_0/gui/wxpython/gui_core/query.py 2014-10-17 15:14:26 UTC (rev 62276)
+++ grass/branches/releasebranch_7_0/gui/wxpython/gui_core/query.py 2014-10-17 15:15:34 UTC (rev 62277)
@@ -173,10 +173,10 @@
def QueryTreeBuilder(data, column):
"""!Builds tree model from query results.
-
+
@param data query results as a dictionary
@param column column name
-
+
@returns tree model
"""
def addNode(parent, data, model):
@@ -185,8 +185,10 @@
node = model.AppendNode(parent=parent, label=k)
addNode(parent=node, data=v, model=model)
else:
+ if not isinstance(v, basestring):
+ v = str(v)
node = model.AppendNode(parent=parent, label=k,
- data={column: str(v)})
+ data={column: v})
model = TreeModel(DictNode)
for part in data:
More information about the grass-commit
mailing list