Add try/except to system info collection so agent doesn't crash if exception is encountered
This commit is contained in:
parent
a83c97519c
commit
91577c6464
|
@ -252,9 +252,12 @@ class InfectionMonkey(object):
|
||||||
|
|
||||||
def collect_system_info_if_configured(self):
|
def collect_system_info_if_configured(self):
|
||||||
LOG.debug("Calling for system info collection")
|
LOG.debug("Calling for system info collection")
|
||||||
system_info_collector = SystemInfoCollector()
|
try:
|
||||||
system_info = system_info_collector.get_info()
|
system_info_collector = SystemInfoCollector()
|
||||||
SystemInfoTelem(system_info).send()
|
system_info = system_info_collector.get_info()
|
||||||
|
SystemInfoTelem(system_info).send()
|
||||||
|
except Exception as e:
|
||||||
|
LOG.exception(f"Exception encountered during system info collection: {str(e)}")
|
||||||
|
|
||||||
def shutdown_by_not_alive_config(self):
|
def shutdown_by_not_alive_config(self):
|
||||||
if not WormConfiguration.alive:
|
if not WormConfiguration.alive:
|
||||||
|
|
Loading…
Reference in New Issue