sysexits
A simple python wrapper around the FreeBSD “preferable exit codes for programs”.
It is useful for getting informative error messages from subprocesses which use FreeBSD-recommended exit codes (linked above).
Usage
Either select an exception manually using the EXCEPTIONS dictionary, or call raise_for_returncode with the completed process.
import subprocess
import sysexits
print(sysexits.EX_PROTOCOL)
# 76
process = subprocess.run("exit 76", shell=True)
print(sysexits.EXCEPTIONS[process.returncode])
# <class 'sysexits.ProtocolError'>
sysexits.raise_for_returncode(process)
# Traceback (most recent call last):
# ...
# sysexits.ProtocolError
License
Copyright (c) 2022 Christopher McDonald
Distributed under the terms of the MIT license.
Metadata
Release files for sysexits 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| sysexits-0.5.0.tar.gz | 6.5 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sysexits-0.5.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.4 kB
Release files / sysexits-0.5.0.tar.gz
| Download URL | sysexits-0.5.0.tar.gz |
|---|---|
| Size | 6.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e9fc1fdab013b146dcd507d2df55cd7a005a3bf4c97b787160432c0d66a02ea5
|
|
BLAKE2b-256 checksum How to use checksums |
1128a47a662771e306a79607081ce6900d96462af4b953760a93f3fb5a73095d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.9.13
|
Release files / sysexits-0.5.0-py3-none-any.whl
| Download URL | sysexits-0.5.0-py3-none-any.whl |
|---|---|
| Size | 4.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
16e7ab45d1c558ee9d7177c387b4fedff4302470d07b7c49909171618d6dae46
|
|
BLAKE2b-256 checksum How to use checksums |
4a167b9d246fca6fd26e827a6a2f9e2a157dfa3bb0e5d612787bccf2e5a03875
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.9.13
|
Security for sysexits 0.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.