Compare commits

...

2 Commits

Author SHA1 Message Date
4aa6a65e6c Work around strange Python anomaly
Apparently, `True` is both an instance of `int` and `bool`, which is a
change and is very strange. Instead flip the conditional here.
2023-08-17 09:55:19 -04:00
81e16e99f6 Correct entrypoint for CLI package 2023-08-17 00:27:45 -04:00
2 changed files with 9 additions and 9 deletions

View File

@ -93,14 +93,14 @@ def finish(success=True, data=None, formatter=None):
else:
echo(CLI_CONFIG, data)
# Allow passing
if isinstance(success, int):
exit(success)
if success:
exit(0)
# Allow passing raw values if not a bool
if isinstance(success, bool):
if success:
exit(0)
else:
exit(1)
else:
exit(1)
exit(success)
def version(ctx, param, value):

View File

@ -3,7 +3,7 @@ from setuptools import setup
setup(
name="pvc",
version="0.9.63",
packages=["pvc", "pvc.lib"],
packages=["pvc.cli", "pvc.lib"],
install_requires=[
"Click",
"PyYAML",
@ -14,7 +14,7 @@ setup(
],
entry_points={
"console_scripts": [
"pvc = pvc.pvc:cli",
"pvc = pvc.cli.cli:cli",
],
},
)