jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/635511 )
Change subject: [bugfix] convert expiry=True to expiry=0 in siteinfo.get() ......................................................................
[bugfix] convert expiry=True to expiry=0 in siteinfo.get()
For compatibility with other siteinfo functions and lower layers in site and api functions handling expiry parameter.
Bug: T266084 Change-Id: I05adfd43c1a5d43e2a7135af0c760dd42708325e --- M pywikibot/site/_siteinfo.py 1 file changed, 4 insertions(+), 0 deletions(-)
Approvals: JJMC89: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/site/_siteinfo.py b/pywikibot/site/_siteinfo.py index 28f13cc..067acaf 100644 --- a/pywikibot/site/_siteinfo.py +++ b/pywikibot/site/_siteinfo.py @@ -275,6 +275,10 @@ get_default option is set to False. @see: L{_get_siteinfo} """ + # If expiry is True, convert it to 0 to be coherent with + # _get_siteinfo() and _get_general() docstring. + if expiry is True: + expiry = 0 # If expiry is a float or int convert to timedelta # Note: bool is an instance of int if isinstance(expiry, float) or type(expiry) == int:
pywikibot-commits@lists.wikimedia.org