mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fixes #26793: convert insert regex to_bytes before searching
This commit is contained in:
parent
2bab91551d
commit
fcad4f38b4
1 changed files with 2 additions and 2 deletions
|
@ -253,9 +253,9 @@ def main():
|
|||
insertafter = 'EOF'
|
||||
|
||||
if insertafter not in (None, 'EOF'):
|
||||
insertre = re.compile(insertafter)
|
||||
insertre = re.compile(to_bytes(insertafter, errors='surrogate_or_strict'))
|
||||
elif insertbefore not in (None, 'BOF'):
|
||||
insertre = re.compile(insertbefore)
|
||||
insertre = re.compile(to_bytes(insertbefore, errors='surrogate_or_strict'))
|
||||
else:
|
||||
insertre = None
|
||||
|
||||
|
|
Loading…
Reference in a new issue