Message350281
If one opens configdialog when there is no Shell and then hits OK, the dialog fails to close. The following Squeezer-related traceback appears in associated console when there is one.
Exception in Tkinter callback
Traceback (most recent call last):
File "F:\dev\3x\lib\tkinter\__init__.py", line 1885, in __call__
return self.func(*args)
File "F:\dev\3x\lib\idlelib\configdialog.py", line 172, in ok
self.apply()
File "F:\dev\3x\lib\idlelib\configdialog.py", line 186, in apply
self.activate_config_changes()
File "F:\dev\3x\lib\idlelib\configdialog.py", line 240, in activate_config_changes
klass.reload()
File "F:\dev\3x\lib\idlelib\squeezer.py", line 222, in reload
instance.load_font()
File "F:\dev\3x\lib\idlelib\squeezer.py", line 318, in load_font
Font(text, font=text.cget('font')).measure('0')
File "F:\dev\3x\lib\idlelib\delegator.py", line 10, in __getattr__
attr = getattr(self.delegate, name) # May raise AttributeError
AttributeError: 'NoneType' object has no attribute 'cget'
Either the squeezer instance should be destroyed and removed along with Shell or, if keeping it is intentional, it should be removed from the update list and reinstated or if not doing that is intentional, it must either check 'if text is not None' before the access or catch the attribute error after. Tal, which? |
|
Date |
User |
Action |
Args |
2019-08-23 13:27:44 | terry.reedy | set | recipients:
+ terry.reedy, taleinat |
2019-08-23 13:27:44 | terry.reedy | set | messageid: <1566566864.85.0.308464800085.issue37929@roundup.psfhosted.org> |
2019-08-23 13:27:44 | terry.reedy | link | issue37929 messages |
2019-08-23 13:27:44 | terry.reedy | create | |
|