mirror of
https://github.com/zerwes/ansible-fqcn-converter.git
synced 2025-02-25 18:55:30 -06:00
taskmatch ends exclude block - fixes issue #31
This commit is contained in:
parent
3b05f282cb
commit
a1c960a614
@ -384,6 +384,7 @@ for f in parsefiles:
|
||||
if args.printdiff:
|
||||
originallines.append(line)
|
||||
nline = line
|
||||
taskmatch = _taskstartregex.match(line)
|
||||
if checkstartexcludeblock(line):
|
||||
in_ignore_block = True
|
||||
startingwhitespaces_ignore_block = re.match(r'\s*-?\s*', line).group()
|
||||
@ -398,11 +399,15 @@ for f in parsefiles:
|
||||
startingwhitespaces_ignore_block = None
|
||||
if args.debug:
|
||||
debugmsg('end exclude block!')
|
||||
elif taskmatch:
|
||||
in_ignore_block = False
|
||||
startingwhitespaces_ignore_block = None
|
||||
if args.debug:
|
||||
debugmsg('taskmatch in exclude block => end exclude block!')
|
||||
else:
|
||||
if args.debug:
|
||||
debugmsg('... in exclude block ... ignore line')
|
||||
if not in_ignore_block:
|
||||
taskmatch = _taskstartregex.match(line)
|
||||
if taskmatch:
|
||||
if args.debug:
|
||||
debugmsg('taskmatch: %s' % taskmatch)
|
||||
|
Loading…
Reference in New Issue
Block a user