[GRASS-SVN] r49572 - grass/trunk/gui/wxpython/modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Dec 6 12:49:50 EST 2011
Author: martinl
Date: 2011-12-06 09:49:50 -0800 (Tue, 06 Dec 2011)
New Revision: 49572
Modified:
grass/trunk/gui/wxpython/modules/extensions.py
Log:
wxGUI/extension: fix loading extensions without any prefix
(merge r49570 from devbr6)
Modified: grass/trunk/gui/wxpython/modules/extensions.py
===================================================================
--- grass/trunk/gui/wxpython/modules/extensions.py 2011-12-06 17:46:43 UTC (rev 49571)
+++ grass/trunk/gui/wxpython/modules/extensions.py 2011-12-06 17:49:50 UTC (rev 49572)
@@ -278,7 +278,7 @@
's' : 'sites',
'v' : 'vector',
'wx' : 'wxGUI',
- 'u' : 'other' }
+ '' : 'other' }
if c in name:
return name[c]
@@ -320,7 +320,7 @@
try:
prefix, name = value.split('.', 1)
except ValueError:
- prefix = 'u'
+ prefix = ''
name = value
if prefix not in mdict:
mdict[prefix] = dict()
@@ -331,11 +331,11 @@
try:
prefix, name = line.strip().split('.', 1)
except:
- prefix = 'unknown'
+ prefix = ''
name = line.strip()
if self._expandPrefix(prefix) == prefix:
- prefix = 'unknown'
+ prefix = ''
if prefix not in mdict:
mdict[prefix] = dict()
@@ -348,8 +348,12 @@
names = mdict[prefix].keys()
names.sort()
for name in names:
+ if prefix:
+ text = prefix + '.' + name
+ else:
+ text = name
new = self.AppendItem(parentId = item,
- text = prefix + '.' + name)
+ text = text)
data = dict()
for key in mdict[prefix][name].keys():
data[key] = mdict[prefix][name][key]
More information about the grass-commit
mailing list