From: Peter Astrand Date: Mon, 21 Feb 2005 08:13:02 +0000 (+0000) Subject: Made the module compatible with Python 2.2 again. X-Git-Tag: v2.5a0~2004 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c26516b29df77ddd232d757c1febb3baf8074aa7;p=python Made the module compatible with Python 2.2 again. --- diff --git a/Lib/subprocess.py b/Lib/subprocess.py index c4a7a65179..382acb6927 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 # # 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: