summaryrefslogtreecommitdiffstats
path: root/Demo/tkinter/guido
diff options
context:
space:
mode:
Diffstat (limited to 'Demo/tkinter/guido')
-rwxr-xr-xDemo/tkinter/guido/ShellWindow.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/Demo/tkinter/guido/ShellWindow.py b/Demo/tkinter/guido/ShellWindow.py
index d7e0a0e..c1d56ef 100755
--- a/Demo/tkinter/guido/ShellWindow.py
+++ b/Demo/tkinter/guido/ShellWindow.py
@@ -121,11 +121,7 @@ def spawn(prog, args):
sys.stderr.write('popen2: bad write dup\n')
if os.dup(c2pwrite) != 2:
sys.stderr.write('popen2: bad write dup\n')
- for i in range(3, MAXFD):
- try:
- os.close(i)
- except:
- pass
+ os.closerange(3, MAXFD)
try:
os.execvp(prog, args)
finally: