fix broken consumption of /proc/mounts

this was checking that the lenghth of the mount line from /proc/mounts
was 6, not the number of tokens.
This commit is contained in:
Scott Moser
2014-01-23 15:24:36 -05:00
parent adf5fe0f3f
commit d120429aa0

View File

@@ -1325,9 +1325,9 @@ def mounts():
# Linux: /dev/sda1 on /boot type ext4 (rw,relatime,data=ordered)
# FreeBSD: /dev/vtbd0p2 on / (ufs, local, journaled soft-updates)
try:
if method == 'proc' and len(mpline) == 6:
if method == 'proc':
(dev, mp, fstype, opts, _freq, _passno) = mpline.split()
elif method == 'mount':
else:
m = re.search('^(/dev/[\S]+) on (/.*) \((.+), .+, (.+)\)$', mpline)
dev = m.group(1)
mp = m.group(2)