diff --git a/src/hetrixtools_freebsd/cli.py b/src/hetrixtools_freebsd/cli.py index 26d8cf3..48335a2 100644 --- a/src/hetrixtools_freebsd/cli.py +++ b/src/hetrixtools_freebsd/cli.py @@ -137,7 +137,8 @@ class Update: """ # get last line, split it on spaces # Total 2097152 259452 1837700 12% - swapinfo = self.callCommand(['/usr/sbin/swapinfo']).splitlines()[-1:].split(" ") + swaptext = self.callCommand(['/usr/sbin/swapinfo']).splitlines()[-1:] + swapinfo = re.split( " +", swaptext[0] ) self.ramswap = str(int(swapinfo[2]) / int(swapinfo[1])) # these don't seem to exist on FreeBSD in the same way self.rambuff = str(0)