From 427b72b5c125aa23f3e2a98e754595a211eaa2bb Mon Sep 17 00:00:00 2001 From: Isis Lovecruft Date: Thu, 7 Mar 2013 00:00:13 +0000 Subject: [PATCH] Fixed misnamed parameters in functions _which() and _fix_unsafe(). --- gnupg.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gnupg.py b/gnupg.py index ded811e..536023b 100644 --- a/gnupg.py +++ b/gnupg.py @@ -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: