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 terry.reedy
Recipients amaury.forgeotdarc, dbackhaus, kbk, ned.deily, roger.serwy, terry.reedy
Date 2013-06-21.00:18:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1371773897.06.0.896729031572.issue18270@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2013-06-21 00:18:17terry.reedysetrecipients: + terry.reedy, kbk, amaury.forgeotdarc, ned.deily, roger.serwy, dbackhaus
2013-06-21 00:18:17terry.reedysetmessageid: <1371773897.06.0.896729031572.issue18270@psf.upfronthosting.co.za>
2013-06-21 00:18:16terry.reedylinkissue18270 messages
2013-06-21 00:18:15terry.reedycreate