mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Merge pull request #15149 from cvrebert/patch-1
modules.service.__virtual__: use raw string for regex
This commit is contained in:
commit
48c1d2da9f
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user