From b415148032331c9d81734b76404b9cc3b6c4e3ec Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Mon, 29 Apr 2024 15:15:13 +0300 Subject: [PATCH] Fix some "invalid escape sequences" errors in bin/optimize.py --- bin/optimize.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/optimize.py b/bin/optimize.py index 2903d9f..516ee2b 100644 --- a/bin/optimize.py +++ b/bin/optimize.py @@ -52,11 +52,11 @@ def write_to_file(contents, path): # Matches the beginning of role-specific blocks. # Example: `# role-specific:playbook_help` -regex_role_specific_block_start = regex.compile('^\s*#\s*role-specific\:\s*([^\s]+)$') +regex_role_specific_block_start = regex.compile('^\\s*#\\s*role-specific:\\s*([^\\s]+)$') # Matches the end of role-specific blocks. # Example: `# /role-specific:playbook_help` -regex_role_specific_block_end = regex.compile('^\s*#\s*/role-specific\:\s*([^\s]+)$') +regex_role_specific_block_end = regex.compile('^\\s*#\\s*/role-specific:\\s*([^\\s]+)$') def process_file_contents(file_name, enabled_role_names, known_role_names): contents = read_file(file_name)