jenkins-bot submitted this change.
[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.