Bug 824485 - XMLRPC: Python driver uses string exceptions
XMLRPC: Python driver uses string exceptions
Product: TCMS
Classification: Other
Component: Application (Show other bugs)
Unspecified Unspecified
unspecified Severity medium
: ---
: 3.8.0
Assigned To: Yang Ren
: Patch
Depends On:
  Show dependency treegraph
Reported: 2012-05-23 11:08 EDT by Petr Šplíchal
Modified: 2018-02-15 19:37 EST (History)
5 users (show)

See Also:
Fixed In Version: 3.8.0-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

  None (edit)
Description Petr Šplíchal 2012-05-23 11:08:31 EDT
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 00:52:11 EDT
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.