summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorPeter Astrand <astrand@lysator.liu.se>2005-02-21 08:13:02 (GMT)
committerPeter Astrand <astrand@lysator.liu.se>2005-02-21 08:13:02 (GMT)
commitc26516b29df77ddd232d757c1febb3baf8074aa7 (patch)
tree1a4c2458d66c0722b57a70d0c7a19048585fe8f7 /Lib
parentafd842f5b262bfe5e2e2e53762d748b5da6caf2c (diff)
downloadcpython-c26516b29df77ddd232d757c1febb3baf8074aa7.zip
cpython-c26516b29df77ddd232d757c1febb3baf8074aa7.tar.gz
cpython-c26516b29df77ddd232d757c1febb3baf8074aa7.tar.bz2
Made the module compatible with Python 2.2 again.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/subprocess.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/Lib/subprocess.py b/Lib/subprocess.py
index c4a7a65..382acb6 100644
--- a/Lib/subprocess.py
+++ b/Lib/subprocess.py
@@ -2,6 +2,8 @@
#
# For more information about this module, see PEP 324.
#
+# This module should remain compatible with Python 2.2, see PEP 291.
+#
# Copyright (c) 2003-2004 by Peter Astrand <astrand@lysator.liu.se>
#
# Licensed to PSF under a Contributor Agreement.
@@ -374,6 +376,7 @@ import sys
mswindows = (sys.platform == "win32")
import os
+import types
import traceback
# Exception classes used by this module.
@@ -712,7 +715,7 @@ class Popen(object):
errread, errwrite):
"""Execute program (MS Windows version)"""
- if not isinstance(args, basestring):
+ if not isinstance(args, types.StringTypes):
args = list2cmdline(args)
# Process startup details
@@ -938,7 +941,7 @@ class Popen(object):
errread, errwrite):
"""Execute program (POSIX version)"""
- if isinstance(args, basestring):
+ if isinstance(args, types.StringTypes):
args = [args]
if shell: