http://www.mediawiki.org/wiki/Special:Code/pywikipedia/10491
Revision: 10491 Author: alexsh Date: 2012-08-19 05:02:10 +0000 (Sun, 19 Aug 2012) Log Message: ----------- wikipedia.py:Page().getRestrictions(): use has_api()
Modified Paths: -------------- trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py =================================================================== --- trunk/pywikipedia/wikipedia.py 2012-08-18 18:16:54 UTC (rev 10490) +++ trunk/pywikipedia/wikipedia.py 2012-08-19 05:02:10 UTC (rev 10491) @@ -1847,9 +1847,7 @@ # restrictions = {} #else: restrictions = { 'edit': None, 'move': None } - try: - api_url = self.site().api_address() - except NotImplementedError: + if not self.site().has_api(): return restrictions
predata = {