Merge "Fix py3 compat for regex searches in YAML validate"

This commit is contained in:
Zuul 2019-02-28 13:21:18 +00:00 committed by Gerrit Code Review
commit ef859797e4

View File

@ -910,7 +910,7 @@ def validate_service_hiera_interpol(f, tpl):
# name. The only exception is allow anything under
# str_replace['params'] ('str_replace;params' in the str notation).
# We need to escape because of '$' char may be in templated params.
query = re.compile(r'\\;str\\_replace\\;params\\;\S*?net',
query = re.compile(r'\\;str(\\)?_replace\\;params\\;\S*?net',
re.IGNORECASE)
if not query.search(re.escape(path_str)):
# Keep parsing, if foo_vip_network, or anything