~certify-web-dev/twisted/certify-trunk

« back to all changes in this revision

Viewing changes to twisted/python/procutils.py

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2007-01-17 14:52:35 UTC
  • mfrom: (1.1.5 upstream) (2.1.2 etch)
  • Revision ID: james.westby@ubuntu.com-20070117145235-btmig6qfmqfen0om
Tags: 2.5.0-0ubuntu1
New upstream version, compatible with python2.5.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
    """
34
34
    result = []
35
35
    exts = filter(None, os.environ.get('PATHEXT', '').split(os.pathsep))
36
 
    for p in os.environ['PATH'].split(os.pathsep):
 
36
    path = os.environ.get('PATH', None)
 
37
    if path is None:
 
38
        return []
 
39
    for p in os.environ.get('PATH', '').split(os.pathsep):
37
40
        p = os.path.join(p, name)
38
41
        if os.access(p, flags):
39
42
            result.append(p)