Xqt has submitted this change. ( 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1323969?usp=email )

Change subject: djvu: Simplify control character cleanup return
......................................................................

djvu: Simplify control character cleanup return

Return the final stripped text directly instead of assigning it immediately 
before returning.

Change-Id: Id03ef18d504360955e7a14178c5b9d60318813e4
---
M pywikibot/tools/djvu.py
1 file changed, 1 insertion(+), 2 deletions(-)

Approvals:
  Xqt: Looks good to me, approved
  jenkins-bot: Verified
  Mahveotm: Looks good to me, but someone else must approve




diff --git a/pywikibot/tools/djvu.py b/pywikibot/tools/djvu.py
index 62e08e0..f9cfd73 100644
--- a/pywikibot/tools/djvu.py
+++ b/pywikibot/tools/djvu.py
@@ -203,8 +203,7 @@
         # unit separator (\037=\x1f): replace with \n
         txt = txt.replace('\x1f', '\n')
         # feed char (\f=\x0c), \n and trailing spaces: strip
-        txt = txt.strip('\x0c\n ')
-        return txt
+        return txt.strip('\x0c\n ')

     @check_page_number
     @check_cache

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

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

Reply via email to