Skip to content

Commit

Permalink
refactor: Remove unhelpful calls to sys.exit(1)
Browse files Browse the repository at this point in the history
The ImportError gives way more insight than just exiting.
  • Loading branch information
maringuu authored and jstucke committed Dec 19, 2024
1 parent 703a9dd commit 5890119
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
9 changes: 1 addition & 8 deletions src/start_fact.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,9 @@
from shlex import split
from subprocess import Popen, TimeoutExpired
from time import sleep

import config

try:
import fact_base # noqa: F401
except ImportError:
sys.exit(1)

from typing import TYPE_CHECKING

import config
from helperFunctions.fileSystem import get_src_dir
from helperFunctions.program_setup import setup_argparser, setup_logging

Expand Down
5 changes: 1 addition & 4 deletions src/start_fact_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,7 @@
import sys
from pathlib import Path

try:
from fact_base import FactBase
except (ImportError, ModuleNotFoundError):
sys.exit(1)
from fact_base import FactBase

import config
from analysis.PluginBase import PluginInitException
Expand Down

0 comments on commit 5890119

Please sign in to comment.