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")
|
||||||
|
try:
|
||||||
system_info_collector = SystemInfoCollector()
|
system_info_collector = SystemInfoCollector()
|
||||||
system_info = system_info_collector.get_info()
|
system_info = system_info_collector.get_info()
|
||||||
SystemInfoTelem(system_info).send()
|
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