[Python-checkins] r62942 - sandbox/trunk/ttk-gsoc/Lib/lib-tk/Ttk.py
guilherme.polo
python-checkins at python.org
Fri May 9 17:22:21 CEST 2008
Author: guilherme.polo
Date: Fri May 9 17:22:20 2008
New Revision: 62942
Log:
Make sure opts exists independent of etype.
Modified:
sandbox/trunk/ttk-gsoc/Lib/lib-tk/Ttk.py
Modified: sandbox/trunk/ttk-gsoc/Lib/lib-tk/Ttk.py
==============================================================================
--- sandbox/trunk/ttk-gsoc/Lib/lib-tk/Ttk.py (original)
+++ sandbox/trunk/ttk-gsoc/Lib/lib-tk/Ttk.py Fri May 9 17:22:20 2008
@@ -332,6 +332,7 @@
def element_create(self, elementname, etype, *args, **kw):
"""Create a new element in the current theme of given etype."""
spec = None
+ opts = ()
if etype in ("image", "vsapi"):
if etype == "image": # define an element based on an image
@@ -357,7 +358,6 @@
# it expects a themename and optionally an element to clone from,
# otherwise it will clone {} (empty)
spec = args[0] # theme name
- opts = ()
if len(args) > 1: # elementfrom specified
opts = (args[1], )
More information about the Python-checkins
mailing list