diff --git a/httpie/core.py b/httpie/core.py index 84f31fbe..cf1f16f7 100644 --- a/httpie/core.py +++ b/httpie/core.py @@ -68,7 +68,7 @@ def main( raise exit_status = ExitStatus.ERROR_CTRL_C except SystemExit as e: - if e.code != ExitStatus.SUCCESS.value: + if e.code != ExitStatus.SUCCESS: env.stderr.write('\n') if include_traceback: raise @@ -86,7 +86,7 @@ def main( raise exit_status = ExitStatus.ERROR_CTRL_C except SystemExit as e: - if e.code != ExitStatus.SUCCESS.value: + if e.code != ExitStatus.SUCCESS: env.stderr.write('\n') if include_traceback: raise diff --git a/httpie/status.py b/httpie/status.py index 93671383..28c75b63 100644 --- a/httpie/status.py +++ b/httpie/status.py @@ -1,7 +1,7 @@ -from enum import Enum +from enum import IntEnum -class ExitStatus(Enum): +class ExitStatus(IntEnum): """Program exit code constants.""" SUCCESS = 0 ERROR = 1