diff --git a/src/sniffles/utils/resmon.py b/src/sniffles/utils/resmon.py index 0bd86db..8092ddf 100644 --- a/src/sniffles/utils/resmon.py +++ b/src/sniffles/utils/resmon.py @@ -48,9 +48,10 @@ def __init__(self, config: SnifflesConfig): try: from psutil import Process - except ImportError as ex: + except ImportError: logging.getLogger('sniffles.dependencies').warning(f'Dependency psutil not available - resource monitoring is disabled.') self._process = None + self._workers = {} else: self._process = Process(self._pid)