http://www.mediawiki.org/wiki/Special:Code/pywikipedia/10669
Revision: 10669 Author: xqt Date: 2012-11-07 13:21:02 +0000 (Wed, 07 Nov 2012) Log Message: ----------- Better exception output for mediawiki_message()
Modified Paths: -------------- trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py =================================================================== --- trunk/pywikipedia/wikipedia.py 2012-11-07 11:36:18 UTC (rev 10668) +++ trunk/pywikipedia/wikipedia.py 2012-11-07 13:21:02 UTC (rev 10669) @@ -6266,7 +6266,7 @@ } datas = query.GetData(params, self)['query']['allmessages'][0] if "missing" in datas: - raise KeyError("message is not exist.") + raise KeyError("message '%s' does not exist." % key) elif datas['name'] not in self._mediawiki_messages: self._mediawiki_messages[datas['name']] = datas['*'] #self._mediawiki_messages = _dict([(tag['name'].lower(), tag['*'])
pywikipedia-svn@lists.wikimedia.org