Skip to content

Commit

Permalink
fix: Fix show_system_resource parsing
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
2 people authored and shinmog committed May 6, 2021
1 parent aa30205 commit 83ab35d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion panos/firewall.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 83ab35d

Please sign in to comment.