jenkins-bot submitted this change.

View Change

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

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:

To view, visit change 635511. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I05adfd43c1a5d43e2a7135af0c760dd42708325e
Gerrit-Change-Number: 635511
Gerrit-PatchSet: 2
Gerrit-Owner: Mpaa <mpaa.wiki@gmail.com>
Gerrit-Reviewer: JJMC89 <JJMC89.Wikimedia@gmail.com>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged