Manila returns Python error when passing optional arguments without using a subcommand

Bug #1902873 reported by Eduardo Santos
6
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://paste.openstack.org/show/799687/

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
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-manilaclient (master)

Reviewed: https://review.opendev.org/761654
Committed: https://git.openstack.org/cgit/openstack/python-manilaclient/commit/?id=aeb47213eaa8f27bea43bb6b915d6be255a9e246
Submitter: Zuul
Branch: master

commit aeb47213eaa8f27bea43bb6b915d6be255a9e246
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
    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-cinderclient.

    Closes-Bug: #1902873
    Change-Id: I5fcafd4bdfb40b2054e1205c14493c2f4be1f77a

Changed in python-manilaclient:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-manilaclient 2.4.0

This issue was fixed in the openstack/python-manilaclient 2.4.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.