Explorar o código

Merge pull request #7485 from openshift-cherrypick-robot/cherry-pick-7484-to-master

Automatic merge from submit-queue.

[master] Changing python regex method from match to search

This is an automated cherry-pick of #7484

/assign sdodson
OpenShift Merge Robot %!s(int64=7) %!d(string=hai) anos
pai
achega
570ea7ddec
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      roles/openshift_logging/library/logging_patch.py

+ 1 - 1
roles/openshift_logging/library/logging_patch.py

@@ -77,7 +77,7 @@ def account_for_whitelist(current_file_contents, new_file_contents, white_list=N
 
     for line in white_list:
         regex_line = r".*" + re.escape(line) + r":.*\n"
-        new_file_line = re.match(regex_line, new_file_contents)
+        new_file_line = re.search(regex_line, new_file_contents)
         if new_file_line:
             current_file_contents = re.sub(regex_line, new_file_line.group(0), current_file_contents)
         else: