diff --git a/monkey/monkey_island/cc/services/utils/network_utils.py b/monkey/monkey_island/cc/services/utils/network_utils.py index bdd2cc404..e68a68748 100644 --- a/monkey/monkey_island/cc/services/utils/network_utils.py +++ b/monkey/monkey_island/cc/services/utils/network_utils.py @@ -53,13 +53,10 @@ else: return result -# The local IP addresses list should not change often. Therefore, we can cache the result and -# never call this function -# more than once. This stopgap measure is here since this function is called a lot of times -# during the report -# generation. -# This means that if the interfaces of the Island machine change, the Island process needs to be -# restarted. +# The local IP addresses list should not change often. Therefore, we can cache the result and never +# call this function more than once. This stopgap measure is here since this function is called a +# lot of times during the report generation. This means that if the interfaces of the Island machine +# change, the Island process needs to be restarted. @lru(maxsize=1) def local_ip_addresses() -> Sequence[str]: ip_list = [] @@ -69,13 +66,10 @@ def local_ip_addresses() -> Sequence[str]: return ip_list -# The subnets list should not change often. Therefore, we can cache the result and never call -# this function -# more than once. This stopgap measure is here since this function is called a lot of times -# during the report -# generation. -# This means that if the interfaces or subnets of the Island machine change, the Island process -# needs to be restarted. +# The subnets list should not change often. Therefore, we can cache the result and never call this +# function more than once. This stopgap measure is here since this function is called a lot of times +# during the report generation. This means that if the interfaces or subnets of the Island machine +# change, the Island process needs to be restarted. @lru(maxsize=1) def get_subnets(): subnets = []