jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/770560 )
Change subject: [bugfix] Decode pdfinfo if it is bytes ......................................................................
[bugfix] Decode pdfinfo if it is bytes
Bug: T303731 Change-Id: I62118ef3c58980cb84ded85ff6e8ab0c6db2eb1e --- M scripts/reflinks.py 1 file changed, 2 insertions(+), 0 deletions(-)
Approvals: Rubin: Looks good to me, but someone else must approve Xqt: Looks good to me, approved jenkins-bot: Verified
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:
pywikibot-commits@lists.wikimedia.org