jenkins-bot has submitted this change and it was merged.
Change subject: site.py: Use api.UploadWarning instead of pywikibot.UploadWarning ......................................................................
site.py: Use api.UploadWarning instead of pywikibot.UploadWarning
site.py recognize pywikibot as the actual module, not the ModuleDeprecationWrapper. api.UploadWarning is also used elsewhere in this script instead of pywikibot.UploadWarning.
Bug: T125777 Change-Id: I3b06825fb6ed87a1d0e5f8e5d4b1873c450b9b36 --- M pywikibot/site.py 1 file changed, 4 insertions(+), 4 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/site.py b/pywikibot/site.py index 369972c..10099e1 100644 --- a/pywikibot/site.py +++ b/pywikibot/site.py @@ -5887,10 +5887,10 @@ UserWarning, 3) warning = list(result["warnings"].keys())[0] message = result["warnings"][warning] - raise pywikibot.UploadWarning(warning, upload_warnings[warning] - % {'msg': message}, - file_key=_file_key, - offset=result.get('offset', False)) + raise api.UploadWarning(warning, upload_warnings[warning] + % {'msg': message}, + file_key=_file_key, + offset=result.get('offset', False)) elif "result" not in result: pywikibot.output(u"Upload: unrecognized response: %s" % result) if result["result"] == "Success":
pywikibot-commits@lists.wikimedia.org