1. myfreeweb
  2. cram


Brodie Rao  committed 1847e3e

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

  • Participants
  • Parent commits 0958fbc
  • Branches default

Comments (0)

Files changed (1)

File cram.py

View file
  • Ignore whitespace
     """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