3466: invalid literal for int() with base 10: in preferences when you try to modify the dates preference

svn: r13891
This commit is contained in:
Doug Blank 2009-12-23 11:32:14 +00:00
parent 361b99cee6
commit d50a004450

View File

@ -993,7 +993,10 @@ class GrampsPreferences(ManagedWindow.ManagedWindow):
f.destroy() f.destroy()
def update_int_entry(self, obj, constant): def update_int_entry(self, obj, constant):
try:
config.set(constant, int(obj.get_text())) config.set(constant, int(obj.get_text()))
except:
print "WARNING: ignoring invalid value for '%s'" % constant
def update_entry(self, obj, constant): def update_entry(self, obj, constant):
config.set(constant, unicode(obj.get_text())) config.set(constant, unicode(obj.get_text()))