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.
This commit is contained in:
parent
cf442fcc2d
commit
b32f478633
|
@ -93,14 +93,14 @@ def finish(success=True, data=None, formatter=None):
|
||||||
else:
|
else:
|
||||||
echo(CLI_CONFIG, data)
|
echo(CLI_CONFIG, data)
|
||||||
|
|
||||||
# Allow passing
|
# Allow passing raw values if not a bool
|
||||||
if isinstance(success, int):
|
if isinstance(success, bool):
|
||||||
exit(success)
|
|
||||||
|
|
||||||
if success:
|
if success:
|
||||||
exit(0)
|
exit(0)
|
||||||
else:
|
else:
|
||||||
exit(1)
|
exit(1)
|
||||||
|
else:
|
||||||
|
exit(success)
|
||||||
|
|
||||||
|
|
||||||
def version(ctx, param, value):
|
def version(ctx, param, value):
|
||||||
|
|
Loading…
Reference in New Issue