From f2d46313a4508f13656cdb360f83fdf4116cc7d7 Mon Sep 17 00:00:00 2001 From: Kelly Brazil Date: Sat, 4 Apr 2020 16:53:55 -0700 Subject: [PATCH] use startswith() instead of find() --- jc/parsers/fstab.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jc/parsers/fstab.py b/jc/parsers/fstab.py index 430378d0..644200dd 100644 --- a/jc/parsers/fstab.py +++ b/jc/parsers/fstab.py @@ -70,7 +70,7 @@ import jc.utils class info(): - version = '1.0' + version = '1.1' description = 'fstab file parser' author = 'Kelly Brazil' author_email = 'kellyjonbrazil@gmail.com' @@ -145,7 +145,7 @@ def parse(data, raw=False, quiet=False): for line in cleandata: output_line = {} # ignore commented lines - if line.strip().find('#') == 0: + if line.strip().startswith('#'): continue line_list = line.split(maxsplit=6)