Manila returns Python error when passing optional arguments without using a subcommand
Bug #1902873 reported by
Eduardo Santos
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-manilaclient |
Fix Released
|
Medium
|
Eduardo Santos |
Bug Description
Steps to reproduce
==================
* I ran the `manila` command without a subcommand while
passing at least one optional argument
Some of the commands in which the bug occurs:
- manila --os-cache
- manila --os-reset-cache
- manila --os-user-id 123
- manila --os-project-name foo
The `--version` argument is an exception.
Expected result
===============
It should display the help message.
Actual result
=============
ERROR: 'Namespace' object has no attribute 'func'
Environment
===========
1. Branch master
Logs & Configs
==============
http://
Changed in python-manilaclient: | |
assignee: | nobody → Eduardo Santos (ecsantos) |
Changed in python-manilaclient: | |
status: | New → In Progress |
Changed in python-manilaclient: | |
importance: | Undecided → Medium |
milestone: | none → wallaby-1 |
To post a comment you must log in.
Reviewed: https:/ /review. opendev. org/761654 /git.openstack. org/cgit/ openstack/ python- manilaclient/ commit/ ?id=aeb47213eaa 8f27bea43bb6b91 5d6be255a9e246
Committed: https:/
Submitter: Zuul
Branch: master
commit aeb47213eaa8f27 bea43bb6b915d6b e255a9e246
Author: Eduardo Santos <email address hidden>
Date: Thu Nov 5 18:27:55 2020 +0000
Fix undesirable raw Python error
Using the manilaclient without a subcommand while cinderclient.
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 `manila --os-cache`.
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.
This patch uses the same fix implemented in the
python-
Closes-Bug: #1902873 2054e1205c14493 c2f4be1f77a
Change-Id: I5fcafd4bdfb40b