Skip to content

Commit

Permalink
fix: change exit code for unexpected errors
Browse files Browse the repository at this point in the history
  • Loading branch information
uniqueg committed Sep 5, 2023
1 parent 6e4307f commit c79d286
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions htsinfer/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import argparse
import logging
from pathlib import Path
from traceback import format_exc
from typing import Dict
import signal
import sys
Expand Down Expand Up @@ -331,6 +332,11 @@ def main() -> None:
LOGGER.error('Execution interrupted.')
sys.exit(128 + signal.SIGINT)

except Exception as exc: # pylint: disable=W0703
LOGGER.error(f"{exc}")
LOGGER.debug(format_exc())
sys.exit(2)

Check warning on line 338 in htsinfer/cli.py

View check run for this annotation

Codecov / codecov/patch

htsinfer/cli.py#L336-L338

Added lines #L336 - L338 were not covered by tests

# conclude execution
LOGGER.info("Done")
sys.exit(hts_infer.state.value)
Expand Down

0 comments on commit c79d286

Please sign in to comment.