Terry J. Reedy added the comment:

In 2.7.5, the offending line is 1558, not 1560. It is clearer to me as
shell.interp.runcommand("print('%s')" % tkversionwarning)

Amaury is correct about 1541, as seen in the if block itself, but I thing the 
shell test should be elevated to guard all the shell-dependend actions, not 
just this one. See below.

To me, the problem in the cracked code and convoluted code is this:

If enable_shell (1520), call open_shell to set both flist.shell and shell but 
return if shell is None. But then at 1532, shell is set to flist.shell, and 
that can only have effect if not enable_shell (as otherwise shell *is* 
flist.shell due to return if None). In this case I expect flist.shell will 
always be None (its backup default as 292). But anyway, 1532 should be at least 
become an else: block for 1520.

The following lines up to 1558 all depend on shell not being None, but only one 
block is guarded. So I think they should all be guarded with one 'if shell:' 
and 'shell removed from 1541

2.7 patch attached. 3.3 code looks identical in this area, so it should have 
same problem and patch should apply to that also.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue18270>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to