[Buildbot-commits] buildbot/buildbot twcompat.py,1.14,1.15

Brian Warner warner at users.sourceforge.net
Mon Dec 11 09:11:29 UTC 2006


Update of /cvsroot/buildbot/buildbot/buildbot
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv21360/buildbot

Modified Files:
	twcompat.py 
Log Message:
[project @ remove which(), twisted-2.0.0 and later has it]

Original author: warner at lothar.com
Date: 2006-12-11 09:02:04

Index: twcompat.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/twcompat.py,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- twcompat.py	11 Dec 2006 09:11:18 -0000	1.14
+++ twcompat.py	11 Dec 2006 09:11:27 -0000	1.15
@@ -10,35 +10,3 @@
 import os
 
 from twisted.copyright import version
-
-# copied from Twisted circa 2.2.0
-def _which(name, flags=os.X_OK):
-    """Search PATH for executable files with the given name.
-
-    @type name: C{str}
-    @param name: The name for which to search.
-
-    @type flags: C{int}
-    @param flags: Arguments to L{os.access}.
-
-    @rtype: C{list}
-    @return: A list of the full paths to files found, in the
-    order in which they were found.
-    """
-    result = []
-    exts = filter(None, os.environ.get('PATHEXT', '').split(os.pathsep))
-    for p in os.environ['PATH'].split(os.pathsep):
-        p = os.path.join(p, name)
-        if os.access(p, flags):
-            result.append(p)
-        for e in exts:
-            pext = p + e
-            if os.access(pext, flags):
-                result.append(pext)
-    return result
-
-which = _which
-try:
-    from twisted.python.procutils import which
-except ImportError:
-    pass





More information about the Commits mailing list