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:
@ -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)
|
||||||
|
@ -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"]
|
||||||
|
Reference in New Issue
Block a user