Bug 824485

Summary: XMLRPC: Python driver uses string exceptions
Product: [Other] TCMS Reporter: Petr Šplíchal <psplicha>
Component: ApplicationAssignee: Yang Ren <ryang>
Status: VERIFIED --- QA Contact: Nobody <nobody>
Severity: medium Docs Contact:
Priority: unspecified    
Version: DevelCC: junzhang, ohudlick, ryang, vchen
Target Milestone: ---Keywords: Patch
Target Release: 3.8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 3.8.0-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Use NitrateError class for raising exceptions instead of plain str none

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.