This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Arfrever
Recipients Arfrever, Ramchandra Apte, asvetlov, barry, benjamin.peterson, christian.heimes, georg.brandl, gpolo, larry, mark.dickinson, pitrou, python-dev, skrah, terry.reedy, zach.ware
Date 2013-08-01.17:31:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1375378288.18.0.687807032585.issue16248@psf.upfronthosting.co.za>
In-reply-to
Content
The fix in 2.6, 2.7, 3.1 and 3.2 branches introduced UnboundLocalError occurring when a non-None baseName parameter is passed.
At least a part of fa82071bb7e1 should be backported to 2.6, 2.7, 3.1 and 3.2 branches.

$ python2.7 -c 'import Tkinter; print(repr(Tkinter.Tk(baseName="some_name")))'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib64/python2.7/lib-tk/Tkinter.py", line 1748, in __init__
    if not sys.flags.ignore_environment:
UnboundLocalError: local variable 'sys' referenced before assignment
$ python3.2 -c 'import tkinter; print(repr(tkinter.Tk(baseName="some_name")))'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib64/python3.2/tkinter/__init__.py", line 1734, in __init__
    if not sys.flags.ignore_environment:
UnboundLocalError: local variable 'sys' referenced before assignment
History
Date User Action Args
2013-08-01 17:31:28Arfreversetrecipients: + Arfrever, barry, georg.brandl, terry.reedy, mark.dickinson, pitrou, larry, christian.heimes, benjamin.peterson, gpolo, asvetlov, skrah, python-dev, Ramchandra Apte, zach.ware
2013-08-01 17:31:28Arfreversetmessageid: <1375378288.18.0.687807032585.issue16248@psf.upfronthosting.co.za>
2013-08-01 17:31:28Arfreverlinkissue16248 messages
2013-08-01 17:31:27Arfrevercreate