summaryrefslogtreecommitdiff
path: root/src/leap/util/fileutil.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap/util/fileutil.py')
-rw-r--r--src/leap/util/fileutil.py11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/leap/util/fileutil.py b/src/leap/util/fileutil.py
index 820ffe46..429e4b12 100644
--- a/src/leap/util/fileutil.py
+++ b/src/leap/util/fileutil.py
@@ -21,7 +21,7 @@ def extend_path():
# XXX add mac / win extended search paths?
-def which(program, path=None):
+def which(program):
"""
an implementation of which
that extends the path with
@@ -67,10 +67,8 @@ def which(program, path=None):
else:
# extended iterator
# with extra path
- if path is None:
- path = os.environ['PATH']
extended_path = chain(
- iter_path(path),
+ iter_path(os.environ["PATH"]),
iter_path(extend_path()))
for candidate in extended_path:
if candidate is not None:
@@ -93,11 +91,6 @@ def mkdir_p(path):
raise
-def mkdir_f(path):
- folder, fname = os.path.split(path)
- mkdir_p(folder)
-
-
def check_and_fix_urw_only(_file):
"""
test for 600 mode and try