[GRASS-SVN] r36779 - grass/branches/develbranch_6/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Apr 18 08:32:37 EDT 2009


Author: martinl
Date: 2009-04-18 08:32:36 -0400 (Sat, 18 Apr 2009)
New Revision: 36779

Modified:
   grass/branches/develbranch_6/gui/wxpython/gui_modules/preferences.py
Log:
hcho: Parse font names correctly (e.g., "Luxi Mono:Regular" is not a color value)
      (merge from trunk, r36689)


Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/preferences.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/preferences.py	2009-04-18 12:27:20 UTC (rev 36778)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/preferences.py	2009-04-18 12:32:36 UTC (rev 36779)
@@ -696,7 +696,10 @@
             elif value == 'None':
                 value = None
             elif ':' in value: # -> color
-                value = tuple(map(int, value.split(':')))
+		try:
+                    value = tuple(map(int, value.split(':')))
+		except ValueError: # -> string
+		    pass
             else:
                 try:
                     value = int(value)



More information about the grass-commit mailing list