Bug 824485 - XMLRPC: Python driver uses string exceptions
Summary: XMLRPC: Python driver uses string exceptions
Keywords:
Status: VERIFIED
Alias: None
Product: TCMS
Classification: Other
Component: Application
Version: Devel
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 3.8.0
Assignee: Yang Ren
QA Contact: Nobody
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-05-23 15:08 UTC by Petr Šplíchal
Modified: 2022-03-14 03:25 UTC (History)
4 users (show)

Fixed In Version: 3.8.0-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)
Use NitrateError class for raising exceptions instead of plain str (2.03 KB, patch)
2012-05-23 15:08 UTC, Petr Šplíchal
no flags Details | Diff

Description Petr Šplíchal 2012-05-23 15:08:31 UTC
Created attachment 586378 [details]
Use NitrateError class for raising exceptions instead of plain str

Description of problem:

When an invalid URL is provided to the python nitrate driver the
following error traceback appears:

> ...
>   File "/usr/lib/python2.6/site-packages/nitrate/api.py", line 192, in getter
>     self._get()
>   File "/usr/lib/python2.6/site-packages/nitrate/api.py", line 1221, in _get
>     hash = self._server.User.filter(
>   File "/usr/lib/python2.6/site-packages/nitrate/api.py", line 394, in _server
>     self._config.nitrate.url).server
>   File "/usr/lib/python2.6/site-packages/nitrate/xmlrpc.py", line 497, in __init__
>     raise "Unrecognized URL scheme"
> TypeError: exceptions must be old-style classes or derived from BaseException, not str

Attaching a patch which fixes this issue.

Comment 2 Xin Gao 2012-07-26 04:52:11 UTC
Verify 3.8.0-1 on stage -->PASS

Verify steps:
Check error info


Actual result:
have been corrected to Nitrate error.


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