jenkins-bot has submitted this change and it was merged.
Change subject: [FIX] APISite.upload: Expect a dict not a list
......................................................................
[FIX] APISite.upload: Expect a dict not a list
The imageinfo returned via query+imageinfo is a list while the imageinfo
returned via upload is just a dict. Since 31cd9fdc it assumed it returned
actually a list of dicts and thus failed when FileInfo tried to create itself
from a part of the dict.
Bug: T100627
Change-Id: I0a31451fee3ac342a748c6b03fea9e9853cefd7f
---
M pywikibot/site.py
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
John Vandenberg: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/site.py b/pywikibot/site.py
index ebcd71d..939fa58 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -5090,7 +5090,7 @@
# If we receive a nochange, that would mean we're in simulation
# mode, don't attempt to access imageinfo
if "nochange" not in result:
- filepage._load_file_revisions(result["imageinfo"])
+ filepage._load_file_revisions([result["imageinfo"]])
return
@deprecated_args(number="step",
--
To view, visit
https://gerrit.wikimedia.org/r/214423
To unsubscribe, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I0a31451fee3ac342a748c6b03fea9e9853cefd7f
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: XZise <CommodoreFabianus(a)gmx.de>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: jenkins-bot <>