xep_0027: Ensure data is a str before handling it
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
parent
80a89061f1
commit
4a6064772c
1 changed files with 2 additions and 0 deletions
|
@ -19,6 +19,8 @@ def _extract_data(data, kind):
|
|||
stripped = []
|
||||
begin_headers = False
|
||||
begin_data = False
|
||||
if isinstance(data, bytes):
|
||||
data = data.decode()
|
||||
for line in data.split('\n'):
|
||||
if not begin_headers and 'BEGIN PGP %s' % kind in line:
|
||||
begin_headers = True
|
||||
|
|
Loading…
Reference in a new issue