-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create and use constants for return codes (#166)
* convert return values to constants * convert to a sharable set of constants * update functional tests to use constants * add changelog fragment * clean up inaccurate comment * Update src/antsibull_changelog/constants.py Co-authored-by: Felix Fontein <felix@fontein.de> * prepend with RC_ for clarity (based on feedback) --------- Co-authored-by: Felix Fontein <felix@fontein.de>
- Loading branch information
1 parent
8b821cb
commit 47fc83e
Showing
9 changed files
with
194 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
minor_changes: | ||
- "Replaces numbers with constants for return codes (https://github.com/ansible-community/antsibull-changelog/issues/77)." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or | ||
# https://www.gnu.org/licenses/gpl-3.0.txt) | ||
# SPDX-License-Identifier: GPL-3.0-or-later | ||
# SPDX-FileCopyrightText: 2020, Ansible Project | ||
""" | ||
Constants used by antsibull-changelog. | ||
""" | ||
|
||
|
||
# Return codes used in cli.py and test files. | ||
RC_SUCCESS = 0 # Success | ||
RC_UNHANDLED_ERROR = 1 # Unhandled error. See the Traceback for more information. | ||
RC_BAD_CLI_ARG = 2 # There was a problem with the command line arguments. | ||
RC_INVALID_FRAGMENT = 3 # Found invalid changelog fragments. | ||
RC_OLD_PYTHON = 4 # Needs to be run on a newer version of Python. | ||
RC_COMMAND_FAILED = 5 # Problem occurred which prevented the execution of the command. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.