Last modified: 2014-06-02 07:56:47 UTC
The argumet givent to pywikibot.exceptions exceptions aren't printed. Sample: >>> import pwb >>> import pywikibot >>> from pywikibot.exceptions import * >>> raise Error('foo') Traceback (most recent call last): File "<pyshell#3>", line 1, in <module> raise Error('foo') Error >>> raise Error('foo %s' %'bar') Traceback (most recent call last): File "<pyshell#4>", line 1, in <module> raise Error('foo %s' %'bar') Error >>> raise NoPage('Pagename') Traceback (most recent call last): File "<pyshell#5>", line 1, in <module> raise NoPage('Pagename') NoPage >>>
Seems bug was introduced with https://gerrit.wikimedia.org/r/#/c/130021/
Reorder objects Error class is derived from seems to work: class Error(Exception, UnicodeMixin): ... >>> import pwb >>> import pywikibot >>> from pywikibot.exceptions import * >>> raise Error('foo') Traceback (most recent call last): File "<pyshell#50>", line 1, in <module> raise Error('foo') Error: foo >>>
Change 136719 had a related patch set uploaded by Xqt: (bug 66012) Reorder inheritance of Error class https://gerrit.wikimedia.org/r/136719
Change 136719 merged by jenkins-bot: (bug 66012) Reorder inheritance of Error class https://gerrit.wikimedia.org/r/136719
Thanks for fixing this so quickly, xqt!