4 from AthenaCommon.Logging
import logging
10 msg=logging.getLogger(
"releaseInRange")
16 relPattern=re.compile(
"^Athena-[0-9]{1,2}\.[0-9]{1,2}\.[0-9]{1,2}$")
19 if not relPattern.match(r):
20 raise RuntimeError(
"Release number %s doesn't match the expected format"%r)
22 inputRelease=flags.Input.Release
23 if not relPattern.match(inputRelease):
24 raise RuntimeError(
"Input release number %s doesn't match the expected format"%inputRelease)
33 if rel1[:i1] != rel2[:i2]:
34 raise RuntimeError(
"Boundary releases not from the same release series, got %s and %s"%(rel1,rel2))
36 iRel=inputRelease.rfind(
".")
37 if rel1[:i1] != inputRelease[:iRel]:
38 msg.info(
"Input release not from the same release series.")
44 current=
int(inputRelease[iRel+1])
47 raise RuntimeError(
"Lower boundary releases %s larger then upper boundary release %s" % (rel1,rel2))
50 if (current >= lower
and current <= upper):