#3573: idle now doesn't hungs if launched as: idle -e <directory>
Patch by Guilherme Polo.
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 @@
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: