From 5eb5658a74131b2472c360f6ec327889da821290 Mon Sep 17 00:00:00 2001 From: grossmj Date: Mon, 20 Sep 2021 18:08:02 +0930 Subject: [PATCH] Fix memory percentage left warning. Fixes #1966 --- gns3server/compute/base_node.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gns3server/compute/base_node.py b/gns3server/compute/base_node.py index 0341d101..52b8713d 100644 --- a/gns3server/compute/base_node.py +++ b/gns3server/compute/base_node.py @@ -844,7 +844,7 @@ class BaseNode: """ available_ram = int(psutil.virtual_memory().available / (1024 * 1024)) - percentage_left = psutil.virtual_memory().percent + percentage_left = 100 - psutil.virtual_memory().percent if requested_ram > available_ram: message = '"{}" requires {}MB of RAM to run but there is only {}MB - {}% of RAM left on "{}"'.format(self.name, requested_ram,