From d7529f66f9f85706738c13be528a266d65be794c Mon Sep 17 00:00:00 2001 From: Thomas Leonard Date: Wed, 15 Oct 2003 13:43:43 +0000 Subject: [PATCH] Bugfix: Python 2.3's new bool type broke options saving (reported by Lars Hansson). git-svn-id: https://rox.svn.sourceforge.net/svnroot/rox/trunk/ROX-Lib2@3170 66de3db3-b00d-0410-b41b-f4738ad19bea --- Help/Changes | 5 +++++ python/rox/options.py | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Help/Changes b/Help/Changes index 5e59bb7..d0ce859 100644 --- a/Help/Changes +++ b/Help/Changes @@ -3,6 +3,11 @@ by Thomas Leonard http://rox.sourceforge.net +15-Oct-2003 +~~~~~~~~~~~ +Bugfix: Python 2.3's new bool type broke options saving (reported by Lars + Hansson). + 13-Oct-2003 ~~~~~~~~~~~ Added PipeThroughCommand class (copied from Archive, with some minor diff --git a/python/rox/options.py b/python/rox/options.py index ee28888..736c68f 100644 --- a/python/rox/options.py +++ b/python/rox/options.py @@ -60,7 +60,12 @@ class Option: self.value = str(value) self.has_changed = 1 try: - self.int_value = int(float(self.value)) + if self.value == 'True': + self.int_value = 1 + elif self.value == 'False': + self.int_value = 0 + else: + self.int_value = int(float(self.value)) except: self.int_value = -1 -- 2.11.4.GIT