summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2013-03-20 08:26:53 -0700
committerKali Kaneko <kali@leap.se>2013-03-20 08:26:53 -0700
commit8f3415a431c4a711b9e6f49f5a00302b38d1a308 (patch)
tree34cffe172f9033ab493bc73d02eea4c4f160f0c6 /src
parent2e26c6c4b1368717681b46e141e2146a17d4e646 (diff)
parentaa490cf0a44012158fec298cda30f0962add0982 (diff)
Merge pull request #2 from chiiph/feature/improve_which
Prioritize path_extension in which method
Diffstat (limited to 'src')
-rw-r--r--src/leap/common/files.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/leap/common/files.py b/src/leap/common/files.py
index 9b80236..e3c8423 100644
--- a/src/leap/common/files.py
+++ b/src/leap/common/files.py
@@ -112,7 +112,7 @@ def which(name, flags=os.X_OK, path_extension="/usr/sbin:/sbin"):
result = []
exts = filter(None, os.environ.get('PATHEXT', '').split(os.pathsep))
path = os.environ.get('PATH', None)
- path += ":" + path_extension
+ path = path_extension + os.pathsep + path
if path is None:
return []
parts = path.split(os.pathsep)