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
Updating based on feedback - strip all whitespace characters instead of updating the regex
This commit is contained in:
parent
c494ddd5fc
commit
fdaa81ccf8
1 changed files with 2 additions and 2 deletions
|
@ -1028,9 +1028,9 @@ def _parse_os_release():
|
|||
|
||||
data = dict()
|
||||
with salt.utils.fopen(filename) as ifile:
|
||||
regex = re.compile('^([\\w]+)=(?:\'|")?(.*?)(?:\'|")?\\s*$')
|
||||
regex = re.compile('^([\\w]+)=(?:\'|")?(.*?)(?:\'|")?$')
|
||||
for line in ifile:
|
||||
match = regex.match(line.strip('\n'))
|
||||
match = regex.match(line.strip())
|
||||
if match:
|
||||
# Shell special characters ("$", quotes, backslash, backtick)
|
||||
# are escaped with backslashes
|
||||
|
|
Loading…
Add table
Reference in a new issue