[GRASS-SVN] r34850 -
grass/branches/develbranch_6/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Dec 13 11:16:54 EST 2008
Author: martinl
Date: 2008-12-13 11:16:54 -0500 (Sat, 13 Dec 2008)
New Revision: 34850
Modified:
grass/branches/develbranch_6/gui/wxpython/gui_modules/dbm.py
Log:
wxGUI/dbm: fix decode error & insert new record dialog
Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/dbm.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/dbm.py 2008-12-13 15:44:05 UTC (rev 34849)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/dbm.py 2008-12-13 16:16:54 UTC (rev 34850)
@@ -255,7 +255,11 @@
except ValueError:
self.itemDataMap[i].append('')
else:
- self.itemDataMap[i].append(unicodeValue(value))
+ try:
+ self.itemDataMap[i].append(unicodeValue(value))
+ except UnicodeDecodeError:
+ self.itemDataMap[i].append(_("Unable to decode value. "
+ "Set encoding in GUI preferences ('Attributes')."))
if keyId > -1 and keyId == j:
try:
@@ -1200,7 +1204,7 @@
values = dlg.GetValues() # values (need to be casted)
columnsString = ''
valuesString = ''
-
+
for i in range(len(values)):
if len(values[i]) == 0: # NULL
if columnName[i] == keyColumn:
@@ -3533,7 +3537,7 @@
for labelId, valueId in self.widgets:
column = self.FindWindowById(labelId).GetLabel().replace(':', '')
if columns is None or column in columns:
- value = self.FindWindowById(valueId).GetValue()
+ value = str(self.FindWindowById(valueId).GetValue())
valueList.append(value)
# add key value
More information about the grass-commit
mailing list