jenkins-bot has submitted this change and it was merged.
Change subject: Ignore warnings due to family codenames with dots ......................................................................
Ignore warnings due to family codenames with dots
PyWikiBot works perfectly when family names have dots in them, however it still shows a warning. This patch avoids that warning.
Change-Id: I18ab14a490186782c68bdddf6e7fb41bdaef4775 --- M pywikibot/site.py 1 file changed, 5 insertions(+), 1 deletion(-)
Approvals: John Vandenberg: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/site.py b/pywikibot/site.py index 16415fb..24898eb 100644 --- a/pywikibot/site.py +++ b/pywikibot/site.py @@ -108,7 +108,11 @@ return _families[fam]
try: - myfamily = imp.load_source(fam, config.family_files[fam]) + # Ignore warnings due to dots in family names. + import warnings + with warnings.catch_warnings(): + warnings.simplefilter("ignore", RuntimeWarning) + myfamily = imp.load_source(fam, config.family_files[fam]) except (ImportError, KeyError): if fatal: pywikibot.error(u"""\
pywikibot-commits@lists.wikimedia.org