Revision: 8450 Author: xqt Date: 2010-08-24 11:58:29 +0000 (Tue, 24 Aug 2010)
Log Message: ----------- bugfix for r7377 (bug #3052167) AttributeError: 'Site' object has no attribute '_getActionUser'
Modified Paths: -------------- trunk/pywikipedia/userlib.py
Modified: trunk/pywikipedia/userlib.py =================================================================== --- trunk/pywikipedia/userlib.py 2010-08-24 11:13:32 UTC (rev 8449) +++ trunk/pywikipedia/userlib.py 2010-08-24 11:58:29 UTC (rev 8450) @@ -379,7 +379,8 @@ if self.isBlocked() and not reBlock: raise AlreadyBlocked()
- self.site()._getActionUser('block', sysop=True) + if not self.site().isAllowed('block', sysop=True): + raise UserActionRefuse('You don't have permission to block') if not expiry: expiry = pywikibot.input(u'Please enter the expiry time for the block:') if not reason: @@ -446,7 +447,8 @@ #This user is probably being queried for purpose of lifting #an autoblock, so can't be blocked. raise AutoblockUser - sefl.site()._getActionUser('block', sysop=True) + if not self.site().isAllowed('block', sysop=True): + raise UserActionRefuse('You don't have permission to block') if expiry is None: expiry = input(u'Please enter the expiry time for the block:') if reason is None:
pywikipedia-svn@lists.wikimedia.org