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

Change subject: [bugfix] Enable watchlist.refresh_all for API generator access
......................................................................

[bugfix] Enable watchlist.refresh_all for API generator access

Bug: T316359
Change-Id: I2b8ab1b3fd5eb75e7a466b569aa5ba5d004b9885
---
M scripts/watchlist.py
1 file changed, 8 insertions(+), 1 deletion(-)

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



diff --git a/scripts/watchlist.py b/scripts/watchlist.py
index 1b94bd4..d5135d9 100755
--- a/scripts/watchlist.py
+++ b/scripts/watchlist.py
@@ -84,7 +84,14 @@
         entry._load_cache()
         entry.parse_key()
         entry._rebuild()
-        if entry.site not in seen and 'watchlistraw' in entry._data:
+        if entry.site in seen:
+            continue
+
+        # for generator API usage we have to check the modules
+        modules = entry._params.get('modules', [])
+        modules_found = any(mod.endswith('watchlistraw') for mod in modules)
+        # for list API usage 'watchlistraw' is directly found
+        if modules_found or 'watchlistraw' in entry._data:
             refresh(entry.site)
             seen.add(entry.site)


--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/826891
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: I2b8ab1b3fd5eb75e7a466b569aa5ba5d004b9885
Gerrit-Change-Number: 826891
Gerrit-PatchSet: 3
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: D3r1ck01 <[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