releaseCommon: fix SyntaxWarning: invalid escape sequence '\s'

This commit is contained in:
Martin Jeřábek 2024-03-01 12:00:04 +01:00 committed by Martin Hořeňovský
parent 4d8affc989
commit b20b365fd2

View File

@ -89,7 +89,7 @@ def updateCmakeFile(version):
def updateMesonFile(version): def updateMesonFile(version):
with open(mesonPath, 'rb') as file: with open(mesonPath, 'rb') as file:
lines = file.readlines() lines = file.readlines()
replacementRegex = re.compile(b'''version\s*:\s*'(\\d+.\\d+.\\d+)', # CML version placeholder, don't delete''') replacementRegex = re.compile(b'''version\\s*:\\s*'(\\d+.\\d+.\\d+)', # CML version placeholder, don't delete''')
replacement = '''version: '{0}', # CML version placeholder, don't delete'''.format(version.getVersionString()).encode('ascii') replacement = '''version: '{0}', # CML version placeholder, don't delete'''.format(version.getVersionString()).encode('ascii')
with open(mesonPath, 'wb') as file: with open(mesonPath, 'wb') as file:
for line in lines: for line in lines: