diff --git a/ats/atsMachines/lcBatch.py b/ats/atsMachines/lcBatch.py index 48ee1aa..b54bfe0 100644 --- a/ats/atsMachines/lcBatch.py +++ b/ats/atsMachines/lcBatch.py @@ -167,7 +167,7 @@ def getBaseHostName(hostname): "get base host name without digits" host = realHostName(hostname) # get non-digit part of node name - wordpat = re.compile('(^[a-zA-Z_]*)(\d*)').search + wordpat = re.compile(r'(^[a-zA-Z_]*)(\d*)').search basehost = wordpat(host).group(1) return basehost diff --git a/ats/atsMachines/slurmProcessorScheduled.py b/ats/atsMachines/slurmProcessorScheduled.py index 8a01b89..4b1d776 100644 --- a/ats/atsMachines/slurmProcessorScheduled.py +++ b/ats/atsMachines/slurmProcessorScheduled.py @@ -56,7 +56,7 @@ def init(self): tarray=tstr.split() SlurmProcessorScheduled.slurm_version_str=tarray[1] log('SLURM VERSION STRING', SlurmProcessorScheduled.slurm_version_str) - tarray=re.split('[\.\-]',SlurmProcessorScheduled.slurm_version_str) + tarray=re.split(r'[\.\-]',SlurmProcessorScheduled.slurm_version_str) SlurmProcessorScheduled.slurm_version_int=(int(tarray[0]) * 1000) + (int(tarray[1]) * 100) + (int(tarray[2])) log('SLURM VERSION NUMBER', SlurmProcessorScheduled.slurm_version_int) diff --git a/ats/reportutils.py b/ats/reportutils.py index 8f74710..4578c95 100644 --- a/ats/reportutils.py +++ b/ats/reportutils.py @@ -102,7 +102,7 @@ def atsrToJUnit(atsrFile=None,junitOut=None,build=True ): def cleanTestCaseName( test ): '''Remove all special chars from the name so it's readable to junit parser. ''' import re - pattern = re.compile('([^\s\w]|_)+') + pattern = re.compile(r'([^\s\w]|_)+') testname = pattern.sub('', test.name) return testname