summaryrefslogtreecommitdiff
path: root/Lib/popen2.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/popen2.py')
-rw-r--r--Lib/popen2.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/popen2.py b/Lib/popen2.py
index b966d4c80e..694979e6d6 100644
--- a/Lib/popen2.py
+++ b/Lib/popen2.py
@@ -72,14 +72,14 @@ class Popen3:
# In case the child hasn't been waited on, check if it's done.
self.poll(_deadstate=sys.maxint)
if self.sts < 0:
- if _active:
+ if _active is not None:
# Child is still running, keep us alive until we can wait on it.
_active.append(self)
def _run_child(self, cmd):
if isinstance(cmd, basestring):
cmd = ['/bin/sh', '-c', cmd]
- for i in range(3, MAXFD):
+ for i in xrange(3, MAXFD):
try:
os.close(i)
except OSError: