summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/PyShell.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2012-03-22 12:57:56 (GMT)
committerBenjamin Peterson <benjamin@python.org>2012-03-22 12:57:56 (GMT)
commit72c6227df88f485ddb851ea95c39918e468bf0d5 (patch)
treec63f67a331ff5483eda7e9468b6d7832ca1acd89 /Lib/idlelib/PyShell.py
parente90cdaa185edf92c069cd3daa7f975e5811ee1dc (diff)
parentb3f95d7ff17f64de1a3b9b0d1e36d9a89748be3f (diff)
downloadcpython-72c6227df88f485ddb851ea95c39918e468bf0d5.zip
cpython-72c6227df88f485ddb851ea95c39918e468bf0d5.tar.gz
cpython-72c6227df88f485ddb851ea95c39918e468bf0d5.tar.bz2
merge heads
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: