[Python-checkins] python/dist/src/Lib subprocess.py,1.16,1.17

astrand at users.sourceforge.net astrand at users.sourceforge.net
Mon Feb 21 09:13:06 CET 2005


Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30011

Modified Files:
	subprocess.py 
Log Message:
Made the module compatible with Python 2.2 again.


Index: subprocess.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/subprocess.py,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- subprocess.py	14 Feb 2005 08:56:32 -0000	1.16
+++ subprocess.py	21 Feb 2005 08:13:02 -0000	1.17
@@ -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 at lysator.liu.se>
 #
 # Licensed to PSF under a Contributor Agreement.
@@ -374,6 +376,7 @@
 mswindows = (sys.platform == "win32")
 
 import os
+import types
 import traceback
 
 # Exception classes used by this module.
@@ -712,7 +715,7 @@
                            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 @@
                            errread, errwrite):
             """Execute program (POSIX version)"""
 
-            if isinstance(args, basestring):
+            if isinstance(args, types.StringTypes):
                 args = [args]
 
             if shell:



More information about the Python-checkins mailing list