]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
#3573: idle now doesn't hungs if launched as: idle -e <directory>
authorAndrew Svetlov <andrew.svetlov@gmail.com>
Wed, 21 Mar 2012 11:23:41 +0000 (13:23 +0200)
committerAndrew Svetlov <andrew.svetlov@gmail.com>
Wed, 21 Mar 2012 11:23:41 +0000 (13:23 +0200)
Patch by Guilherme Polo.

Lib/idlelib/NEWS.txt
Lib/idlelib/PyShell.py
Misc/NEWS

index 0a4f98e9fba3a91215b5937c2225d20fcb0e43dc..4482be2024ab62d335a2f9f6b16662f835a51c2b 100644 (file)
@@ -1,3 +1,10 @@
+What's New in IDLE 3.2.3?
+=========================
+
+- Issue #3573: IDLE hangs when passing invalid command line args
+  (directory(ies) instead of file(s)).
+
+
 What's New in IDLE 3.2.1?
 =========================
 
index 6bf0a8c65df9c1f5a43c05532a5a522a60d0eeb8..74a37db862e5023f46df1842cfc021f487e077e9 100644 (file)
@@ -1389,8 +1389,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:
index 3375decccdfee5e89f280293c643c689b26e7aac..dcf4e2359d85973fcd91083a308b0bd01a67e62d 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -28,6 +28,9 @@ Core and Builtins
 Library
 -------
 
+- Issue #3573: IDLE hangs when passing invalid command line args
+  (directory(ies) instead of file(s)) (Patch by Guilherme Polo)
+
 - Issue #13694: asynchronous connect in asyncore.dispatcher does not set addr
   attribute.