From e85d845b1aa5a18537907ba561a2718db2ccbed8 Mon Sep 17 00:00:00 2001 From: Takashi Natsume Date: Mon, 4 Jan 2021 13:39:38 +0900 Subject: Fix undesirable raw Python error Using the novaclient 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 `nova --os-compute-api-version 2.87`. 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: Ic3e87b67f6d27d40b03d7d8e520fa0f79a4d09e5 Closes-Bug: #1903727 Signed-off-by: Takashi Natsume --- releasenotes/notes/fix-raw-python-error-debd3edb17c2f675.yaml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 releasenotes/notes/fix-raw-python-error-debd3edb17c2f675.yaml (limited to 'releasenotes') diff --git a/releasenotes/notes/fix-raw-python-error-debd3edb17c2f675.yaml b/releasenotes/notes/fix-raw-python-error-debd3edb17c2f675.yaml new file mode 100644 index 00000000..7686ecbe --- /dev/null +++ b/releasenotes/notes/fix-raw-python-error-debd3edb17c2f675.yaml @@ -0,0 +1,7 @@ +--- +fixes: + - | + `Bug #1903727 `_: + Fixed raw Python error message when using ``nova`` without + a subcommand while passing an optional argument, such as + ``--os-compute-api-version 2.87``. -- cgit v1.2.1