jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/375710 )
Change subject: APISite.logevents: Allow empty list as the namespace parameter ......................................................................
APISite.logevents: Allow empty list as the namespace parameter
This fixes a regression introduced in ecb4bd67393c158ab9e9406d567dea4208ffd9a8 which was causing test_logpages_dump to fail because the default value for `namespace` parameter is `[]`.
Change-Id: I9ae4cac160702b12b49ff258e02b0acf5cdbfbad --- M pywikibot/site.py 1 file changed, 1 insertion(+), 1 deletion(-)
Approvals: jenkins-bot: Verified Xqt: Looks good to me, approved
diff --git a/pywikibot/site.py b/pywikibot/site.py index 4a4dba6..2b81e4d 100644 --- a/pywikibot/site.py +++ b/pywikibot/site.py @@ -4544,7 +4544,7 @@ legen.request["leend"] = end if reverse: legen.request["ledir"] = "newer" - if namespace is not None: + if namespace or namespace == 0: legen.request["lenamespace"] = namespace if tag: # Supported in version 1.16+; earlier sites will cause APIError