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)
pywikibot-commits@lists.wikimedia.org