Agent: Usa agent config object instead of dict in option_parsing.py

This commit is contained in:
vakaris_zilius 2022-06-23 15:06:48 +00:00 committed by Mike Salvatore
parent 9286e86900
commit 86ed174d74
1 changed files with 4 additions and 5 deletions

View File

@ -1,13 +1,12 @@
from typing import Dict from common.configuration import CustomPBAConfiguration
from infection_monkey.utils.environment import is_windows_os from infection_monkey.utils.environment import is_windows_os
def custom_pba_is_enabled(pba_options: Dict) -> bool: def custom_pba_is_enabled(pba_options: CustomPBAConfiguration) -> bool:
if not is_windows_os(): if not is_windows_os():
if pba_options["linux_command"]: if pba_options.linux_command:
return True return True
else: else:
if pba_options["windows_command"]: if pba_options.windows_command:
return True return True
return False return False