swift-recon --md5sum should exit with an error code on error

Bug #1712600 reported by Pete Zaitcev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Object Storage (swift)
New
Undecided
Unassigned

Bug Description

<rcernin> zaitcev: actually it would be nice if swift-recon --md5sum returns exit code 1 if there is error reported.
<rcernin> zaitcev: but because it always return 0, we need to check for the [^0] error
<rcernin> zaitcev: if it would return the right exit code, i d just run it without any control structure.

See also: https://review.gerrithub.io/375225

The code does some strange things:

- The wrapper in bin/swift-recon passes the return code to sys.exit(), perfect. BUT the catcher of ^C does not pass it, AND the SwiftRecon.main() does not actually return anything useful, EVER.

- Including strangely enough when it trows a usage help! It invokes sys.exit() explicitly even, which is just rude.

P.S. Swift git tag is 2.14.0 for this

Pete Zaitcev (zaitcev)
description: updated
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.