(fix) SyntaxWarning with python 3.12
Changelog of python : - Invalid backslash escape sequences in strings now warn with SyntaxWarning instead of DeprecationWarning, making them more visible. (They will become syntax errors in the future.)
This commit is contained in:
committed by
Simon Fonteneau
parent
fcdda7826c
commit
338497eb21
@@ -72,7 +72,7 @@ class backup_xcp_metadata(backup_generic):
|
||||
|
||||
filelist = os.listdir(self.backup_dir)
|
||||
filelist.sort()
|
||||
p = re.compile('^%s-(?P<date>\d{8,8}-\d{2,2}h\d{2,2}m\d{2,2}).dump.gz$' % self.server_name)
|
||||
p = re.compile(r'^%s-(?P<date>\d{8,8}-\d{2,2}h\d{2,2}m\d{2,2}).dump.gz$' % self.server_name)
|
||||
for item in filelist:
|
||||
sr = p.match(item)
|
||||
if sr:
|
||||
|
||||
Reference in New Issue
Block a user