From 83ab35d781cfab83feb112d1a9685d65c0521918 Mon Sep 17 00:00:00 2001 From: Kevin Bannier Date: Wed, 3 Feb 2021 18:17:11 +0100 Subject: [PATCH] fix: Fix show_system_resource parsing fix(firewall.show_system_resources): Parse result with unlimited number of whitespaces between 'KiB Mem :' and the next value (#280) Co-authored-by: Kevin Bannier --- panos/firewall.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/panos/firewall.py b/panos/firewall.py index 2d05e724..1af2a199 100644 --- a/panos/firewall.py +++ b/panos/firewall.py @@ -386,7 +386,7 @@ def show_system_resources(self): result = self.xapi.xml_root() if self._version_info >= (9, 0, 0): regex = re.compile( - r"load average: ([\d\.]+).*? ([\d\.]+) id,.*KiB Mem : (\d+) total,.*? (\d+) free", + r"load average: ([\d\.]+).*? ([\d\.]+) id,.*KiB Mem :\s+(\d+) total,.*? (\d+) free", re.DOTALL, ) else: