diff --git a/neat/locals/manager.py b/neat/locals/manager.py index 71e2263..5d77ceb 100644 --- a/neat/locals/manager.py +++ b/neat/locals/manager.py @@ -431,9 +431,6 @@ def vm_mhz_to_percentage(vm_mhz_history, host_mhz_history, physical_cpu_mhz): :return: The history of the host's CPU utilization in percentages. :rtype: list(float) """ - if not vm_mhz_history: - return [0.] - max_len = max(len(x) for x in vm_mhz_history) if len(host_mhz_history) > max_len: host_mhz_history = host_mhz_history[-max_len:] diff --git a/tests/locals/test_manager.py b/tests/locals/test_manager.py index 88dcb34..0c48b0b 100644 --- a/tests/locals/test_manager.py +++ b/tests/locals/test_manager.py @@ -195,10 +195,3 @@ class LocalManager(TestCase): [300, 0, 300, 0, 300], 3000), [0.1, 0.2, 0.2, 0.5]) - - self.assertEqual(manager.vm_mhz_to_percentage( - [], - [300, 0, 300, 0, 300], - 3000), - [0.]) -