Commits

Brodie Rao  committed 1847e3e

Remove superfluous os.path.exists() in which()

  • Participants
  • Parent commits 0958fbc

Comments (0)

Files changed (1)

     """Return the patch to cmd or None if not found"""
     for p in os.environ['PATH'].split(os.pathsep):
         path = os.path.join(p, cmd)
-        if os.path.exists(path) and os.access(path, os.X_OK):
+        if os.access(path, os.X_OK):
             return path
     return None