diff options
author | Andrew Svetlov <andrew.svetlov@gmail.com> | 2012-03-20 23:03:26 +0200 |
---|---|---|
committer | Andrew Svetlov <andrew.svetlov@gmail.com> | 2012-03-20 23:03:26 +0200 |
commit | 6b6e437626e94ad5ef3233ea9129c48957f1a41b (patch) | |
tree | f0afb737f9ad26488de4a0e54f65365b2c1fc6f7 /Lib/idlelib/PyShell.py | |
parent | 669b755c92aac40cc3d14e94b9e6dbc1e48d3ef0 (diff) | |
download | cpython-git-6b6e437626e94ad5ef3233ea9129c48957f1a41b.tar.gz |
#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.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/idlelib/PyShell.py b/Lib/idlelib/PyShell.py index 6b75a8d4d0..d7edce501f 100644 --- a/Lib/idlelib/PyShell.py +++ b/Lib/idlelib/PyShell.py @@ -1403,8 +1403,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: |