Merge pull request #15149 from cvrebert/patch-1

modules.service.__virtual__: use raw string for regex
This commit is contained in:
Thomas S Hatch 2014-08-21 13:40:37 -06:00
commit 48c1d2da9f

View File

@ -54,7 +54,7 @@ def __virtual__():
# non-digit characters, and the zeroth element is the major # non-digit characters, and the zeroth element is the major
# number (it'd be so much simpler if it was always "X.Y"...) # number (it'd be so much simpler if it was always "X.Y"...)
import re import re
if int(re.split('\D+', __grains__.get('osrelease', ''))[0]) >= 12: if int(re.split(r'\D+', __grains__.get('osrelease', ''))[0]) >= 12:
return False return False
except ValueError: except ValueError:
return False return False