jenkins-bot submitted this change.

View Change

Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
[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(-)

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 change 826891. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I2b8ab1b3fd5eb75e7a466b569aa5ba5d004b9885
Gerrit-Change-Number: 826891
Gerrit-PatchSet: 3
Gerrit-Owner: Xqt <info@gno.de>
Gerrit-Reviewer: D3r1ck01 <xsavitar.wiki@aol.com>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged