Build Update for wikimedia/pywikibot-core
-------------------------------------
Build: #1795
Status: Passed
Duration: 35 minutes and 32 seconds
Commit: bcbe4db (master)
Author: John Vandenberg
Message: revertbot uses invalid pywikibot.out
Also performs equality between APIError and string, which is brittle.
And silently ignored all other types of APIError.
Change-Id: Idf056b7845c348101bd0033d1f625dff629da49d
View the changeset: https://github.com/wikimedia/pywikibot-core/compare/753ee34fd4ca...bcbe4dbc…
View the full build log and details: https://travis-ci.org/wikimedia/pywikibot-core/builds/43987112
--
You can configure recipients for build notifications in your .travis.yml file. See http://docs.travis-ci.com/user/notifications
jenkins-bot has submitted this change and it was merged.
Change subject: revertbot uses invalid pywikibot.out
......................................................................
revertbot uses invalid pywikibot.out
Also performs equality between APIError and string, which is brittle.
And silently ignored all other types of APIError.
Change-Id: Idf056b7845c348101bd0033d1f625dff629da49d
---
M scripts/revertbot.py
1 file changed, 5 insertions(+), 3 deletions(-)
Approvals:
Ricordisamoa: Looks good to me, approved
jenkins-bot: Verified
diff --git a/scripts/revertbot.py b/scripts/revertbot.py
index 9a2741f..161263e 100644
--- a/scripts/revertbot.py
+++ b/scripts/revertbot.py
@@ -112,9 +112,11 @@
pywikibot.data.api.Request(action="rollback", title=page.title(), user=self.user,
token=rev[4], markbot=1).submit()
except pywikibot.data.api.APIError as e:
- if e == "badtoken: Invalid token":
- pywikibot.out("There is an issue for rollbacking the edit, Giving up")
- return False
+ if e.code == 'badtoken':
+ pywikibot.error("There was an API token error rollbacking the edit")
+ else:
+ pywikibot.exception()
+ return False
return u"The edit(s) made in %s by %s was rollbacked" % (page.title(), self.user)
def log(self, msg):
--
To view, visit https://gerrit.wikimedia.org/r/179776
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Idf056b7845c348101bd0033d1f625dff629da49d
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: Ricordisamoa <ricordisamoa(a)openmailbox.org>
Gerrit-Reviewer: jenkins-bot <>
Build Update for wikimedia/pywikibot-core
-------------------------------------
Build: #1794
Status: Passed
Duration: 37 minutes and 3 seconds
Commit: 753ee34 (master)
Author: Ricordisamoa
Message: Remove deprecated 'throttle' argument from BasePage.get() calls
It has been marked as deprecated by Russell Blau
with commit 3e8ea74a5c85016dd4eb15c1d8f4324805953976
Change-Id: Ib7812dd6c7bf0ae7cec657910a9e9cb6e275bfba
View the changeset: https://github.com/wikimedia/pywikibot-core/compare/7c6305fdff1a...753ee34f…
View the full build log and details: https://travis-ci.org/wikimedia/pywikibot-core/builds/43983623
--
You can configure recipients for build notifications in your .travis.yml file. See http://docs.travis-ci.com/user/notifications
jenkins-bot has submitted this change and it was merged.
Change subject: Remove deprecated 'throttle' argument from BasePage.get() calls
......................................................................
Remove deprecated 'throttle' argument from BasePage.get() calls
It has been marked as deprecated by Russell Blau
with commit 3e8ea74a5c85016dd4eb15c1d8f4324805953976
Change-Id: Ib7812dd6c7bf0ae7cec657910a9e9cb6e275bfba
---
M scripts/imagetransfer.py
M scripts/solve_disambiguation.py
2 files changed, 5 insertions(+), 5 deletions(-)
Approvals:
John Vandenberg: Looks good to me, approved
jenkins-bot: Verified
diff --git a/scripts/imagetransfer.py b/scripts/imagetransfer.py
index bb16569..12d4e3e 100644
--- a/scripts/imagetransfer.py
+++ b/scripts/imagetransfer.py
@@ -234,7 +234,7 @@
% (i, image.title(asLink=True)))
try:
# Show the image description page's contents
- pywikibot.output(image.get(throttle=False))
+ pywikibot.output(image.get())
# look if page already exists with this name.
# TODO: consider removing this: a different image of the same
# name may exist on the target wiki, and the bot user may want
@@ -244,11 +244,11 @@
targetTitle = '%s:%s' % (self.targetSite.image_namespace(),
image.title().split(':', 1)[1])
targetImage = pywikibot.Page(self.targetSite, targetTitle)
- targetImage.get(throttle=False)
+ targetImage.get()
pywikibot.output(u"Image with this name is already on %s."
% self.targetSite)
print("-" * 60)
- pywikibot.output(targetImage.get(throttle=False))
+ pywikibot.output(targetImage.get())
sys.exit()
except pywikibot.NoPage:
# That's the normal case
diff --git a/scripts/solve_disambiguation.py b/scripts/solve_disambiguation.py
index a0a9aa1..0374f5c 100644
--- a/scripts/solve_disambiguation.py
+++ b/scripts/solve_disambiguation.py
@@ -560,7 +560,7 @@
unlink = False
new_targets = []
try:
- text = refPage.get(throttle=False)
+ text = refPage.get()
ignoreReason = self.checkContents(text)
if ignoreReason:
pywikibot.output('\n\nSkipping %s because it contains %s.\n\n'
@@ -596,7 +596,7 @@
if not self.treat(refPage2, refPage):
break
elif choice == 'c':
- text = refPage.get(throttle=False, get_redirect=True)
+ text = refPage.get(get_redirect=True)
include = "redirect"
except pywikibot.NoPage:
pywikibot.output(
--
To view, visit https://gerrit.wikimedia.org/r/179770
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib7812dd6c7bf0ae7cec657910a9e9cb6e275bfba
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Ricordisamoa <ricordisamoa(a)openmailbox.org>
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 <>