From ca65be894669c10aaec4e22731603922a37af3ca Mon Sep 17 00:00:00 2001 From: Daniel Goldberg Date: Tue, 17 Apr 2018 11:33:14 +0300 Subject: [PATCH] Additional edge case in parsing Azure configuration files --- infection_monkey/system_info/azure_cred_collector.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infection_monkey/system_info/azure_cred_collector.py b/infection_monkey/system_info/azure_cred_collector.py index ad7db0307..3b1127e44 100644 --- a/infection_monkey/system_info/azure_cred_collector.py +++ b/infection_monkey/system_info/azure_cred_collector.py @@ -96,7 +96,7 @@ class AzureCollector(object): except IOError: LOG.warning("Failed to parse VM Access plugin file. Could not open file") return None - except (KeyError, ValueError): + except (KeyError, ValueError, IndexError): LOG.warning("Failed to parse VM Access plugin file. Invalid format") return None except subprocess.CalledProcessError: