From 454b519c7025f1efe58c1f6033d217d7e3984553 Mon Sep 17 00:00:00 2001 From: "Piotr F. Mieszkowski" Date: Tue, 19 Apr 2022 21:22:34 +0200 Subject: [PATCH] Use bytes in confirm_key's line operations --- GnuPG/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/GnuPG/__init__.py b/GnuPG/__init__.py index d16e97d..3a79897 100644 --- a/GnuPG/__init__.py +++ b/GnuPG/__init__.py @@ -89,9 +89,9 @@ def confirm_key( content, email ): result = p.communicate(input=content)[1] confirmed = False - for line in result.split("\n"): - if 'imported' in line and '<' in line and '>' in line: - if line.split('<')[1].split('>')[0].lower() == email.lower(): + for line in result.split(b"\n"): + if b'imported' in line and b'<' in line and b'>' in line: + if line.split(b'<')[1].split(b'>')[0].lower() == email.lower(): confirmed = True break else: