No message on error

Bug #1246356 reported by Jakub Ružička
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-openstackclient
Fix Released
Undecided
Terry Howe

Bug Description

Errors are now handled this way in shell.py:

try:
    return OpenStackShell().run(argv)
except Exception:
    return 1

Easiest and most common error is missing credentials.

In case command is called, this leads to proper message, i.e.:
# openstack user list
ERROR: cliff.app You must provide a username via either --os-username or env[OS_USERNAME]

But when called interactively, openstack just silently exits with 1:
# openstack ; echo $?
1

I wonder if it's not worthy to just display the Exception error? If it isn't for some reason, this case should be handled properly.

description: updated
Revision history for this message
Jakub Ružička (jruzicka) wrote :

Also, when missing required package version, the exception got thrown away. It took some time to figure out what went wrong instead of just reading the message.

Terry Howe (thowe-g)
Changed in python-openstackclient:
assignee: nobody → Terry Howe (thowe-g)
Revision history for this message
Terry Howe (thowe-g) wrote :
Changed in python-openstackclient:
status: New → In Progress
Terry Howe (thowe-g)
Changed in python-openstackclient:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-openstackclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/58857

Revision history for this message
Terry Howe (thowe-g) wrote :

One more fix on this ticket has been merged:

https://review.openstack.org/#/c/58859/

Dean Troyer (dtroyer)
Changed in python-openstackclient:
milestone: none → m2
Terry Howe (thowe-g)
Changed in python-openstackclient:
status: Fix Committed → Fix Released
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.