From c865298ef3613fe6ce17f41c15209a69940af1ce Mon Sep 17 00:00:00 2001 From: Kelly Brazil Date: Mon, 17 Feb 2020 22:29:39 -0800 Subject: [PATCH] remove unnecessary enumerate in for loop --- jc/parsers/ls.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jc/parsers/ls.py b/jc/parsers/ls.py index 5912839e..24989668 100644 --- a/jc/parsers/ls.py +++ b/jc/parsers/ls.py @@ -235,7 +235,7 @@ def parse(data, raw=False, quiet=False): if linedata: # Check if -l was used to parse extra data if re.match('^[-dclpsbDCMnP?]([-r][-w][-xsS]){2}([-r][-w][-xtT])[+]?', linedata[0]): - for i, entry in list(enumerate(linedata)): + for entry in linedata: output_line = {} parsed_line = entry.split(maxsplit=8) @@ -262,6 +262,7 @@ def parse(data, raw=False, quiet=False): if parent: output_line['parent'] = parent + output_line['flags'] = parsed_line[0] output_line['links'] = parsed_line[1] output_line['owner'] = parsed_line[2]