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:

--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/770560
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.wikimedia.org/r/settings

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I62118ef3c58980cb84ded85ff6e8ab0c6db2eb1e
Gerrit-Change-Number: 770560
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: D3r1ck01 <[email protected]>
Gerrit-Reviewer: Rubin <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to