forked from p15670423/monkey
Agent: rename PlannedShutdownException to PlannedShutdownError
This will stay consistent with python and our own codebase
This commit is contained in:
parent
89436a4cd9
commit
0806afed1a
|
@ -23,6 +23,7 @@ from infection_monkey.telemetry.messengers.legacy_telemetry_messenger_adapter im
|
|||
from infection_monkey.telemetry.state_telem import StateTelem
|
||||
from infection_monkey.telemetry.tunnel_telem import TunnelTelem
|
||||
from infection_monkey.utils.environment import is_windows_os
|
||||
from infection_monkey.utils.exceptions.planned_shutdown_error import PlannedShutdownError
|
||||
from infection_monkey.utils.monkey_dir import get_monkey_dir_path, remove_monkey_dir
|
||||
from infection_monkey.utils.monkey_log_path import get_monkey_log_path
|
||||
from infection_monkey.utils.signal_handler import register_signal_handlers
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
class PlannedShutdownError(Exception):
|
||||
pass
|
|
@ -3,7 +3,7 @@ import signal
|
|||
|
||||
from infection_monkey.i_master import IMaster
|
||||
from infection_monkey.utils.environment import is_windows_os
|
||||
from infection_monkey.utils.exceptions.planned_shutdown_exception import PlannedShutdownException
|
||||
from infection_monkey.utils.exceptions.planned_shutdown_error import PlannedShutdownError
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
@ -16,7 +16,7 @@ class StopSignalHandler:
|
|||
self._handle_signal(signum)
|
||||
# Windows signal handlers must return boolean. Only raising this exception for POSIX
|
||||
# signals.
|
||||
raise PlannedShutdownException("Monkey Agent got an interrupt signal")
|
||||
raise PlannedShutdownError("Monkey Agent got an interrupt signal")
|
||||
|
||||
def handle_windows_signals(self, signum):
|
||||
import win32con
|
||||
|
|
Loading…
Reference in New Issue