1
0
mirror of https://github.com/httpie/cli.git synced 2025-12-24 00:31:09 +02:00

exit 0 constant: OK => SUCCESS to avoid confusion w/ HTTP 200 OK

This commit is contained in:
Jakub Roztocil
2018-11-02 16:07:39 +01:00
parent 96444f3345
commit b596fedf13
6 changed files with 20 additions and 20 deletions

View File

@@ -219,7 +219,7 @@ def http(*args, **kwargs):
sys.stderr.write(stderr.read())
raise
else:
if not error_exit_ok and exit_status != ExitStatus.OK:
if not error_exit_ok and exit_status != ExitStatus.SUCCESS:
dump_stderr()
raise ExitStatusError(
'httpie.core.main() unexpectedly returned'
@@ -243,7 +243,7 @@ def http(*args, **kwargs):
r.stderr = stderr.read()
r.exit_status = exit_status
if r.exit_status != ExitStatus.OK:
if r.exit_status != ExitStatus.SUCCESS:
sys.stderr.write(r.stderr)
return r