Last modified: 2014-06-02 07:56:47 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T68012, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 66012 - Error messages aren't printed
Error messages aren't printed
Status: RESOLVED FIXED
Product: Pywikibot
Classification: Unclassified
General (Other open bugs)
core-(2.0)
All All
: High major
: ---
Assigned To: xqt
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-06-02 05:13 UTC by xqt
Modified: 2014-06-02 07:56 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description xqt 2014-06-02 05:13:10 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
>>>
Comment 1 xqt 2014-06-02 05:22:14 UTC
Seems bug was introduced with https://gerrit.wikimedia.org/r/#/c/130021/
Comment 2 xqt 2014-06-02 05:32:32 UTC
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
>>>
Comment 3 Gerrit Notification Bot 2014-06-02 07:35:47 UTC
Change 136719 had a related patch set uploaded by Xqt:
(bug 66012) Reorder inheritance of Error class

https://gerrit.wikimedia.org/r/136719
Comment 4 Gerrit Notification Bot 2014-06-02 07:56:15 UTC
Change 136719 merged by jenkins-bot:
(bug 66012) Reorder inheritance of Error class

https://gerrit.wikimedia.org/r/136719
Comment 5 Merlijn van Deen (test) 2014-06-02 07:56:47 UTC
Thanks for fixing this so quickly, xqt!

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links