Change regex expression only to match #[multilib] string (#1364)

* Changed regex expression only to match [multilib] string

* Update multilib regex expression

* Update regex expression

Add raw string format
This commit is contained in:
0xShree 2022-08-01 08:33:38 +00:00 committed by GitHub
parent 31e6eca3af
commit 94d611d22f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -325,7 +325,7 @@ class Installer:
def enable_multilib_repository(self):
# Set up a regular expression pattern of a commented line containing 'multilib' within []
pattern = re.compile("^#\\[.*multilib.*\\]$")
pattern = re.compile(r"^#\s*\[multilib\]$")
# This is used to track if the previous line is a match, so we end up uncommenting the line after the block.
matched = False