[GRASS-SVN] r57853 - grass/trunk/gui/wxpython/core
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Sep 27 05:37:25 PDT 2013
Author: turek
Date: 2013-09-27 05:37:25 -0700 (Fri, 27 Sep 2013)
New Revision: 57853
Modified:
grass/trunk/gui/wxpython/core/workspace.py
Log:
wx.workspace: handle empty strings
Modified: grass/trunk/gui/wxpython/core/workspace.py
===================================================================
--- grass/trunk/gui/wxpython/core/workspace.py 2013-09-27 08:33:30 UTC (rev 57852)
+++ grass/trunk/gui/wxpython/core/workspace.py 2013-09-27 12:37:25 UTC (rev 57853)
@@ -76,6 +76,11 @@
"""!Get node text"""
p = node.find(tag)
if p is not None:
+ # if empty text is inside tag,
+ # etree returns None
+ if p.text is None:
+ return ''
+
return normalize_whitespace(p.text)
return default
More information about the grass-commit
mailing list