jenkins-bot has submitted this change and it was merged.
Change subject: Remove unnecessary return in Siteinfo._get_general ......................................................................
Remove unnecessary return in Siteinfo._get_general
Siteinfo._get_general has a return at the end of the 'force' branch, which is not necessary as the next lines repeat the same logic in a more generic way. Removing this return simplifies the flow of the method.
Change-Id: I87dceaa8ed4d4339f54bc63ad00b22bf820c2f6a --- M pywikibot/site.py 1 file changed, 0 insertions(+), 2 deletions(-)
Approvals: Mpaa: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/site.py b/pywikibot/site.py index 13da02c..bc9ce9f 100644 --- a/pywikibot/site.py +++ b/pywikibot/site.py @@ -1046,8 +1046,6 @@ default_info = self._get_siteinfo(props, expiry) for prop in props: self._cache[prop] = default_info[prop] - if key in default_info: - return default_info[key] if key in self._cache['general'][0]: return self._cache['general'][0][key], self._cache['general'] else:
pywikibot-commits@lists.wikimedia.org