Cinder shows a raw python error when using --os-volume-api-version incorrectly
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| python-cinderclient |
Undecided
|
Eduardo Santos |
Bug Description
Description of problem:
In general, cinder shows a help message when a user types a wrong command. However, when using microversion shows a raw python error prompts.
How reproducible:
cinder --version
> 6.0.0
cinder --os-volume-
> ERROR: 'Namespace' object has no attribute 'func'
Actual results:
ERROR: 'Namespace' object has no attribute 'func'
Expected results:
It must be something about adding the option that messes things up.
Changed in cinder: | |
assignee: | nobody → Sofia Enriquez (lsofia-enriquez) |
Sean McGinnis (sean-mcginnis) wrote : | #2 |
Works fine for me if I actually give it a command, so appears to be just when needing to print the help output.
Changed in python-cinderclient: | |
status: | New → Confirmed |
no longer affects: | cinder |
Changed in python-cinderclient: | |
assignee: | nobody → Sofia Enriquez (lsofia-enriquez) |
Changed in python-cinderclient: | |
assignee: | Sofia Enriquez (lsofia-enriquez) → Eduardo Santos (ecsantos) |
tags: | added: low-hanging-fruit |
Fix proposed to branch: master
Review: https:/
Changed in python-cinderclient: | |
status: | Confirmed → In Progress |
Reviewed: https:/
Committed: https:/
Submitter: Zuul
Branch: master
commit d92f15a09e59942
Author: Eduardo Santos <email address hidden>
Date: Fri Oct 23 14:17:23 2020 +0000
Fix undesirable raw Python error
Using the cinderclient without a subcommand while
passing an optional argument triggers the raw Python
error `ERROR: 'Namespace' object has no attribute
'func'`. This bug can be reproduced by issuing the
command `cinder --os-volume-
Added a default value to `func` and an empty value to
`command` as placeholders so that a help message is
shown instead of the Python error.
Change-Id: Idb51e8635b97f0
Closes-Bug: #1867061
Changed in python-cinderclient: | |
status: | In Progress → Fix Released |
This issue was fixed in the openstack/
Some more info:
cinder --debug --os-volume- api-version 3.40 smcginnis/ src/openstack/ python- cinderclient/ cinderclient/ shell.py" , line 1018, in main nderShell( ).main( sys.argv[ 1:]) smcginnis/ src/openstack/ python- cinderclient/ cinderclient/ shell.py" , line 609, in main ent.shell: 'Namespace' object has no attribute 'func' smcginnis/ src/openstack/ python- cinderclient/ cinderclient/ shell.py" , line 1018, in main nderShell( ).main( sys.argv[ 1:]) smcginnis/ src/openstack/ python- cinderclient/ cinderclient/ shell.py" , line 609, in main
DEBUG (shell:1026) 'Namespace' object has no attribute 'func'
Traceback (most recent call last):
File "/home/
OpenStackCi
File "/home/
if args.func == self.do_help:
AttributeError: 'Namespace' object has no attribute 'func'
DEBUG:cindercli
Traceback (most recent call last):
File "/home/
OpenStackCi
File "/home/
if args.func == self.do_help:
AttributeError: 'Namespace' object has no attribute 'func'
ERROR: 'Namespace' object has no attribute 'func'