jenkins-bot submitted this change.

View Change

Approvals: Rubin: Looks good to me, but someone else must approve Xqt: Looks good to me, approved jenkins-bot: Verified
[bugfix] Decode pdfinfo if it is bytes

Bug: T303731
Change-Id: I62118ef3c58980cb84ded85ff6e8ab0c6db2eb1e
---
M scripts/reflinks.py
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/scripts/reflinks.py b/scripts/reflinks.py
index ed54129..6e7aba8 100755
--- a/scripts/reflinks.py
+++ b/scripts/reflinks.py
@@ -522,6 +522,8 @@
pywikibot.exception()
else:
for aline in pdfinfo_out.splitlines():
+ if isinstance(aline, bytes):
+ aline = aline.decode()
if aline.lower().startswith('title'):
ref.title = ' '.join(aline.split()[1:])
if ref.title:

To view, visit change 770560. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I62118ef3c58980cb84ded85ff6e8ab0c6db2eb1e
Gerrit-Change-Number: 770560
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info@gno.de>
Gerrit-Reviewer: D3r1ck01 <xsavitar.wiki@aol.com>
Gerrit-Reviewer: Rubin <rubin.happy@gmail.com>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged