Swift cli doesn't return exit codes

Bug #973557 reported by Paul Bourke
28
This bug affects 5 people
Affects Status Importance Assigned to Milestone
python-swiftclient
Fix Released
Undecided
Unassigned

Bug Description

If /usr/bin/swift encounters an error it still returns 0 to the caller:

e.g. (arbitrary example)

$ swift -A https://localhost/v1.0 -U user -K key stat
[Errno 111] ECONNREFUSED
$ echo $?
0

This makes it more difficult to use the swift cli in simple scripts.
Will try and submit a patch soon if I get a chance.

tags: added: python-swiftclient
Vincent Hou (houshengbo)
Changed in swift:
status: New → Confirmed
Thierry Carrez (ttx)
affects: swift → python-swiftclient
Revision history for this message
Samuel Merritt (torgomatic) wrote :

Was fixed in 6119de7. The commit message even referenced this bug, but I guess it didn't get updated.

Changed in python-swiftclient:
status: Confirmed → Fix Committed
Revision history for this message
Jacek Nykis (jacekn) wrote :

This is still happening on swift 2.0.3:

$ swift list
Unauthorised. Check username, password and tenant name/id
$ echo $?
0
$ swift stat dummy
Unauthorised. Check username, password and tenant name/id
$ echo $?
0

python-swiftclient 1:2.0.3-0ubuntu1~cloud0

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-swiftclient (master)

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

Revision history for this message
Alistair Coles (alistair-coles) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on python-swiftclient (master)

Change abandoned by Alistair Coles (<email address hidden>) on branch: master
Review: https://review.openstack.org/160169
Reason: I am abandoning this review because there has been no activity for over 3 months and I believe the bug is already fixed. Please feel free to restore the review if you disagree. Thanks for your contribution.

Changed in python-swiftclient:
milestone: none → 2.5.0
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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