[Python-checkins] r63909 - in sandbox/trunk/ttk-gsoc/src: 2.x/ttk.py 3.x/ttk.py

guilherme.polo python-checkins at python.org
Tue Jun 3 02:41:16 CEST 2008


Author: guilherme.polo
Date: Tue Jun  3 02:41:15 2008
New Revision: 63909

Log:
Now, the fix done at r63900 finally seems good.

Modified:
   sandbox/trunk/ttk-gsoc/src/2.x/ttk.py
   sandbox/trunk/ttk-gsoc/src/3.x/ttk.py

Modified: sandbox/trunk/ttk-gsoc/src/2.x/ttk.py
==============================================================================
--- sandbox/trunk/ttk-gsoc/src/2.x/ttk.py	(original)
+++ sandbox/trunk/ttk-gsoc/src/2.x/ttk.py	Tue Jun  3 02:41:15 2008
@@ -255,7 +255,8 @@
                 val = map(int, val.split())
         except (AttributeError, TypeError, ValueError):
             # it is not a bool, neither a string and not even a tuple or list
-            # but still could be a statespec value
+            pass
+        else: # but could be a statespec val
             if val and hasattr(val, "__len__") and hasattr(val[0], "typename"):
                 val = _list_from_statespec(val)
 

Modified: sandbox/trunk/ttk-gsoc/src/3.x/ttk.py
==============================================================================
--- sandbox/trunk/ttk-gsoc/src/3.x/ttk.py	(original)
+++ sandbox/trunk/ttk-gsoc/src/3.x/ttk.py	Tue Jun  3 02:41:15 2008
@@ -251,11 +251,12 @@
     for opt, val in zip(iter(ttuple[::2]), iter(ttuple[1::2])):
 
         try:
-            if ' ' in val: # could be the padding option
+            if ' ' in val: # val could be the padding option
                 val = list(map(int, val.split()))
         except (AttributeError, TypeError, ValueError):
             # it is not a bool, neither a string and not even a tuple or list
-            # but still could be a statespec value
+            pass
+        else: # but could be a statespec val
             if val and hasattr(val, "__len__") and hasattr(val[0], "typename"):
                 val = _list_from_statespec(val)
 


More information about the Python-checkins mailing list