Fixed misnamed parameters in functions _which() and _fix_unsafe().

feature/documentation-builds-dirhtml
Isis Lovecruft 2013-03-07 00:00:13 +00:00 committed by Isis Lovecruft
parent dc52ab08a0
commit 427b72b5c1
1 changed files with 2 additions and 3 deletions

View File

@ -536,10 +536,9 @@ def _fix_unsafe(input):
## xxx do we want to add ';'?
_unsafe = re.compile(r'[^\w@%+=:,./-]', 256)
if len(_unsafe.findall(input)) == 0:
logger.debug("Sane arguments passed: %s" % input)
return input
else:
clean = "'" + gpg_args.replace("'", "'\"'\"'") + "'"
clean = "'" + input.replace("'", "'\"'\"'") + "'"
return clean
def _is_file(input):
@ -887,7 +886,7 @@ def _which(executable, flags=os.X_OK):
if path is None:
return []
for p in os.environ.get('PATH', '').split(os.pathsep):
p = os.path.join(p, name)
p = os.path.join(p, executable)
if os.access(p, flags):
result.append(p)
for e in exts: