summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/PyShell.py
diff options
context:
space:
mode:
authorAndrew Svetlov <andrew.svetlov@gmail.com>2012-03-21 11:35:08 (GMT)
committerAndrew Svetlov <andrew.svetlov@gmail.com>2012-03-21 11:35:08 (GMT)
commit7c010ee00cc0bfb859c326d9a78bd8dd2bf92246 (patch)
tree5e392e8133ed337502800efa809dbb5b56d9a2b3 /Lib/idlelib/PyShell.py
parent3d3cf48e53404996cff2e5a7e35812245b3e0a31 (diff)
downloadcpython-7c010ee00cc0bfb859c326d9a78bd8dd2bf92246.zip
cpython-7c010ee00cc0bfb859c326d9a78bd8dd2bf92246.tar.gz
cpython-7c010ee00cc0bfb859c326d9a78bd8dd2bf92246.tar.bz2
#3573: idle now doesn't hungs if launched as: idle -e <directory>
Patch by Guilherme Polo.
Diffstat (limited to 'Lib/idlelib/PyShell.py')
-rw-r--r--Lib/idlelib/PyShell.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/idlelib/PyShell.py b/Lib/idlelib/PyShell.py
index 895d7da..eeb33e1 100644
--- a/Lib/idlelib/PyShell.py
+++ b/Lib/idlelib/PyShell.py
@@ -1412,8 +1412,10 @@ def main():
if enable_edit:
if not (cmd or script):
- for filename in args:
- flist.open(filename)
+ for filename in args[:]:
+ if flist.open(filename) is None:
+ # filename is a directory actually, disconsider it
+ args.remove(filename)
if not args:
flist.new()
if enable_shell: