1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-06-17 00:07:37 +02:00

fix for space if filesystem name

This commit is contained in:
Kelly Brazil
2024-06-18 08:47:02 -07:00
parent ed048c7b2b
commit 0350607359
2 changed files with 12 additions and 10 deletions

View File

@ -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) 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)

View File

@ -77,7 +77,7 @@ import jc.utils
class info(): class info():
"""Provides parser metadata (version, author, etc.)""" """Provides parser metadata (version, author, etc.)"""
version = '1.9' version = '1.10'
description = '`mount` command parser' description = '`mount` command parser'
author = 'Kelly Brazil' author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com' author_email = 'kellyjonbrazil@gmail.com'
@ -138,16 +138,18 @@ def _linux_parse(data):
pattern = re.compile( pattern = re.compile(
r''' r'''
(?P<filesystem>\S+)\s+ (?P<filesystem>.*)
on\s+ \son\s
(?P<mount_point>.*?)\s+ (?P<mount_point>.*?)
type\s+ \stype\s
(?P<type>\S+)\s+ (?P<type>\S+)
\((?P<options>.*?)\)\s*''', \s+
\((?P<options>.*?)\)
\s*''',
re.VERBOSE) re.VERBOSE)
match = pattern.match(entry) mymatch = pattern.match(entry)
groups = match.groupdict() groups = mymatch.groupdict()
if groups: if groups:
output_line['filesystem'] = groups["filesystem"] output_line['filesystem'] = groups["filesystem"]