mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-07-15 01:24:29 +02:00
use startswith() instead of find()
This commit is contained in:
@ -70,7 +70,7 @@ import jc.utils
|
|||||||
|
|
||||||
|
|
||||||
class info():
|
class info():
|
||||||
version = '1.0'
|
version = '1.1'
|
||||||
description = 'fstab file parser'
|
description = 'fstab file parser'
|
||||||
author = 'Kelly Brazil'
|
author = 'Kelly Brazil'
|
||||||
author_email = 'kellyjonbrazil@gmail.com'
|
author_email = 'kellyjonbrazil@gmail.com'
|
||||||
@ -145,7 +145,7 @@ def parse(data, raw=False, quiet=False):
|
|||||||
for line in cleandata:
|
for line in cleandata:
|
||||||
output_line = {}
|
output_line = {}
|
||||||
# ignore commented lines
|
# ignore commented lines
|
||||||
if line.strip().find('#') == 0:
|
if line.strip().startswith('#'):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
line_list = line.split(maxsplit=6)
|
line_list = line.split(maxsplit=6)
|
||||||
|
Reference in New Issue
Block a user