candlepin/subscription-manager — pull request #1041 by Ceiu (2014-10-17 15:20:05+00:00)
Title: 1119688: Improved error code usage in subman.

- Standardized most print & sys.exit calls with the system_exit
abstraction.

- Standardized error code usage, using os.EX_* constants where appropriate:
- EX_USAGE for improper usage of command options
- EX_DATAERR for proper command usage with invalid provided data
- EX_UNAVAILABLE for command options which are unsupported by the
current server
- EX_SOFTWARE for internal fatal errors
- Others used somewhat liberally where seemingly appropriate

- Added error output to the status command:
- 0 when the system is registered and no errors occur during the check
- 1 when the system is not registered