jenkins-bot has submitted this change and it was merged.
Change subject: Add site.unblockuser() ......................................................................
Add site.unblockuser()
Change-Id: Ib6dc1b87b126cff89a0beeb0bcd1713fb5bd3304 --- M pywikibot/site.py 1 file changed, 10 insertions(+), 0 deletions(-)
Approvals: Merlijn van Deen: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/site.py b/pywikibot/site.py index a232365..5400729 100644 --- a/pywikibot/site.py +++ b/pywikibot/site.py @@ -3142,6 +3142,16 @@ data = req.submit() return data
+ @must_be(group='sysop') + def unblockuser(self, user, reason): + + token = self.token(user, 'block') + req = api.Request(site=self, action='unblock', user=user.username, + reason=reason, token=token) + + data = req.submit() + return data + def watchpage(self, page, unwatch=False): """Add or remove page from watchlist.
pywikibot-commits@lists.wikimedia.org