Merge "Fix py27 tests - expand the regex when adding 'when' to playbook" into stable/pike

This commit is contained in:
Jenkins 2017-09-08 00:53:13 +00:00 committed by Gerrit Code Review
commit 8706d23cff
1 changed files with 1 additions and 1 deletions

View File

@ -68,7 +68,7 @@ class DownloadConfig(command.Command):
step = match.group(1)
whenline = task.get('when', None)
if whenline: # how about list of when conditionals
when_exists = re.search('step == [0-9]', whenline)
when_exists = re.search('step.* == [0-9]', whenline)
if when_exists: # skip if there is an existing 'step == N'
continue
task['when'] = "(%s) and (step == %s)" % (whenline, step)