From afa0303c57534875f34077c8b92243e8d1333e32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Brunner?= Date: Mon, 2 Dec 2024 13:25:19 +0100 Subject: [PATCH] Fix code can be None --- tilecloud_chain/store/postgresql.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tilecloud_chain/store/postgresql.py b/tilecloud_chain/store/postgresql.py index a6b85fbe9..df37d5475 100644 --- a/tilecloud_chain/store/postgresql.py +++ b/tilecloud_chain/store/postgresql.py @@ -234,7 +234,7 @@ def _start_job( main(final_command, out) _LOGGER.info("Successfully ran the command `%s` using the function directly", display_command) except SystemExit as exception: - if exception.code != 0: + if exception.code is not None and exception.code != 0: _LOGGER.exception("Error while running the command `%s`", display_command) error = True except Exception: # pylint: disable=broad-exception-caught