[zaqarclient] version argument to client can produce errors when passing a float value
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Python client library for Zaqar |
Fix Released
|
Undecided
|
wangxiyuan |
Bug Description
i am creating an application that uses an oslo.config value to enable the user with the ability to choose their zaqar version. one way to do this is to use a FloatOpt for the config value to allow values such as "1.1". in the course of doing this work, i have learned that when passing a value of "2" as a float to the zaqarclient.
steps to reproduce (from the python repl):
>>> from zaqarclient.queues import client as zaqar_client
>>> zc = zaqar_client.
>>> zc.queues()
<zaqarclient.
>>> zc = zaqar_client.
>>> zc.queues()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/
queue_list = core.queue_
File "/home/
resp = transport.
File "/home/
url, method, request = self._prepare(
File "/home/
if not request.api:
File "/home/
raise errors.
zaqarclient.
suggested fix:
the Client object should be more tolerant of values that it accepts and convert them to the proper value, especially if this value will be used to template rest calls.
[1]: https:/
description: | updated |
description: | updated |
Changed in zaqar: | |
assignee: | nobody → wangxiyuan (wangxiyuan) |
affects: | zaqar → python-zaqarclient |
https:/ /review. openstack. org/#/c/ 308736/