Xqt has uploaded a new change for review.
https://gerrit.wikimedia.org/r/291607
Change subject: [IMPR] unpack version history items by index
......................................................................
[IMPR] unpack version history items by index
getVersionHistory() may have different items length but we only need the first.
Change-Id: If9aec07b6641f66395379f76a115c92f726a9e89
---
M imagereview.py
1 file changed, 2 insertions(+), 3 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/pywikibot/bots/xqbot
refs/changes/07/291607/1
diff --git a/imagereview.py b/imagereview.py
index 5469b12..210c7c7 100644
--- a/imagereview.py
+++ b/imagereview.py
@@ -807,11 +807,10 @@
imageID = None
linked = []
found = False
- vh = image.getVersionHistory()
# Search for last bot action
- for oldid, time, username, summary in vh:
+ for items in image.getVersionHistory():
if username in [u'Xqbot', u'BLUbot']:
- imageID = oldid
+ imageID = items[0]
break
if imageID:
--
To view, visit https://gerrit.wikimedia.org/r/291607
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: If9aec07b6641f66395379f76a115c92f726a9e89
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/bots/xqbot
Gerrit-Branch: master
Gerrit-Owner: Xqt <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits