Skip to content

Commit

Permalink
mandos: fix bytes manipulation with endswith
Browse files Browse the repository at this point in the history
  • Loading branch information
RaitoBezarius committed Aug 16, 2020
1 parent a9eba6c commit 78515bb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mandos
Expand Up @@ -219,7 +219,7 @@ class PGPEngine:
for line in output.splitlines():
name, text, path = line.split(b":")
if name == b"gpg":
self.gpg = path
self.gpg = path.decode('utf8')
break
except OSError as e:
if e.errno != errno.ENOENT:
Expand All @@ -229,7 +229,7 @@ class PGPEngine:
'--force-mdc',
'--quiet']
# Only GPG version 1 has the --no-use-agent option.
if self.gpg == b"gpg" or self.gpg.endswith(b"/gpg"):
if self.gpg == "gpg" or self.gpg.endswith("/gpg"):
self.gnupgargs.append("--no-use-agent")

def __enter__(self):
Expand Down

0 comments on commit 78515bb

Please sign in to comment.