فهرست منبع

wx.workspace: handle empty strings

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@57853 15284696-431f-4ddb-bdfa-cd5b030d7da7
Štěpán Turek 11 سال پیش
والد
کامیت
5506515e75
1فایلهای تغییر یافته به همراه5 افزوده شده و 0 حذف شده
  1. 5 0
      gui/wxpython/core/workspace.py

+ 5 - 0
gui/wxpython/core/workspace.py

@@ -76,6 +76,11 @@ class ProcessWorkspaceFile:
         """!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