Skip to content

Latest commit

 

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

exitcode_py

Python constants for libc, LSB, BSD, and systemd exit codes, based on this list compiled in the systemd docs.

Installation

This package is not published to PyPI; the name exitcode there belongs to an unrelated project. Install it from this repo:

pip install git+https://github.com/cdzombak/exitcode_py@v1.0.0

A wheel and sdist are also attached to each GitHub release.

Usage

import sys

import exitcode

if len(sys.argv) < 2:
    sys.exit(exitcode.USAGE)
sys.exit(exitcode.SUCCESS)

Generated code

exitcode/__init__.py is generated by cdzombak/exitcodes and should never be edited by hand. To change an exit code or add a new one, edit exitcodes.tsv in that repo; a pull request will be opened here automatically with the regenerated file.

Note that pyproject.toml's version is not generated, and must be bumped to match before tagging a release; the release workflow checks this and fails if the two disagree.

License

MIT; see LICENSE.

Author

Chris Dzombak (dzombak.com; GitHub @cdzombak).

About

Codegenerated Python constants for libc, LSB, BSD, and systemd exit codes

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages