From 0350607359f552ee7651d006dba46b90d7869e92 Mon Sep 17 00:00:00 2001 From: Kelly Brazil Date: Tue, 18 Jun 2024 08:47:02 -0700 Subject: [PATCH] fix for space if filesystem name --- docs/parsers/mount.md | 2 +- jc/parsers/mount.py | 20 +++++++++++--------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/docs/parsers/mount.md b/docs/parsers/mount.md index 21a89e09..fd61b63d 100644 --- a/docs/parsers/mount.md +++ b/docs/parsers/mount.md @@ -100,4 +100,4 @@ Compatibility: linux, darwin, freebsd, aix Source: [`jc/parsers/mount.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/mount.py) -Version 1.9 by Kelly Brazil (kellyjonbrazil@gmail.com) +Version 1.10 by Kelly Brazil (kellyjonbrazil@gmail.com) diff --git a/jc/parsers/mount.py b/jc/parsers/mount.py index c2297130..0d7b2f4b 100644 --- a/jc/parsers/mount.py +++ b/jc/parsers/mount.py @@ -77,7 +77,7 @@ import jc.utils class info(): """Provides parser metadata (version, author, etc.)""" - version = '1.9' + version = '1.10' description = '`mount` command parser' author = 'Kelly Brazil' author_email = 'kellyjonbrazil@gmail.com' @@ -138,16 +138,18 @@ def _linux_parse(data): pattern = re.compile( r''' - (?P\S+)\s+ - on\s+ - (?P.*?)\s+ - type\s+ - (?P\S+)\s+ - \((?P.*?)\)\s*''', + (?P.*) + \son\s + (?P.*?) + \stype\s + (?P\S+) + \s+ + \((?P.*?)\) + \s*''', re.VERBOSE) - match = pattern.match(entry) - groups = match.groupdict() + mymatch = pattern.match(entry) + groups = mymatch.groupdict() if groups: output_line['filesystem'] = groups["filesystem"]