jenkins-bot has submitted this change. ( 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/850152 )

Change subject: [cleanup] ignore legacy throttle format.
......................................................................

[cleanup] ignore legacy throttle format.

throttle format was changed with Pywikibot 6.2.0 (5f4d5fb).
Remove this legacy detection and just ignore wrong lines.

Change-Id: Ic4c603f74de8d6657dab80af38d7e2abc65874f5
---
M pywikibot/throttle.py
1 file changed, 3 insertions(+), 7 deletions(-)

Approvals:
  Xqt: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/pywikibot/throttle.py b/pywikibot/throttle.py
index adb107a..0404497 100644
--- a/pywikibot/throttle.py
+++ b/pywikibot/throttle.py
@@ -111,20 +111,16 @@
             return

         for line in lines:
-            # parse line; format is "pid timestamp site"
+            # parse line; format is "module_id pid timestamp site"
             try:
-                items = line.split(' ')
-                if len(items) == 3:  # read legacy format
-                    _id, _pid, _time, _site = self._module_hash(), *items
-                else:
-                    _id, _pid, _time, _site = items
+                _id, _pid, _time, _site = line.split(' ')
                 proc_entry = ProcEntry(
                     module_id=_id,
                     pid=int(_pid),
                     time=int(float(_time)),
                     site=_site.rstrip()
                 )
-            except (IndexError, ValueError):
+            except (IndexError, ValueError):  # pragma: no cover
                 # Sometimes the file gets corrupted ignore that line
                 continue
             yield proc_entry

--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/850152
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: Ic4c603f74de8d6657dab80af38d7e2abc65874f5
Gerrit-Change-Number: 850152
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <[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