mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-06-19 00:17:51 +02:00
move variables to top
This commit is contained in:
@ -218,6 +218,10 @@ def parse(data, raw=False, quiet=False):
|
||||
jc.utils.compatibility(__name__, info.compatible)
|
||||
|
||||
raw_output = []
|
||||
warned = False
|
||||
parent = ''
|
||||
next_is_parent = False
|
||||
new_section = False
|
||||
|
||||
linedata = data.splitlines()
|
||||
|
||||
@ -226,9 +230,6 @@ def parse(data, raw=False, quiet=False):
|
||||
if re.match('^total [0-9]+', linedata[0]):
|
||||
linedata.pop(0)
|
||||
|
||||
parent = ''
|
||||
next_is_parent = False
|
||||
|
||||
# Look for parent line if glob or -R is used
|
||||
if not re.match('^[-dclpsbDCMnP?]([-r][-w][-xsS]){2}([-r][-w][-xtT])[+]?', linedata[0]) \
|
||||
and linedata[0].endswith(':'):
|
||||
@ -236,9 +237,6 @@ def parse(data, raw=False, quiet=False):
|
||||
# Pop following total line
|
||||
linedata.pop(0)
|
||||
|
||||
warned = False
|
||||
new_section = 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]):
|
||||
|
Reference in New Issue
Block a user