mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Grains return wrong OS version and other OS related values for Oracle Linux
OEL contains space characters at the end of some lines. The current regular expression doesn't expect that. This causes various issues especially for "service" module which doesn't work on OEL.
This commit is contained in:
parent
ab890b632a
commit
c494ddd5fc
1 changed files with 1 additions and 1 deletions
|
@ -1028,7 +1028,7 @@ def _parse_os_release():
|
|||
|
||||
data = dict()
|
||||
with salt.utils.fopen(filename) as ifile:
|
||||
regex = re.compile('^([\\w]+)=(?:\'|")?(.*?)(?:\'|")?$')
|
||||
regex = re.compile('^([\\w]+)=(?:\'|")?(.*?)(?:\'|")?\\s*$')
|
||||
for line in ifile:
|
||||
match = regex.match(line.strip('\n'))
|
||||
if match:
|
||||
|
|
Loading…
Add table
Reference in a new issue