Merge pull request #12909 from photoninger/sles11.4-fix_2nd_try
Fix for SLES 11.4, which has now also an /etc/os-release file.
This commit is contained in:
commit
315fd15f69
1 changed files with 2 additions and 2 deletions
|
@ -438,9 +438,9 @@ class Facts(object):
|
|||
release = re.search("^PRETTY_NAME=[^(]+ \(?([^)]+?)\)", line)
|
||||
if release:
|
||||
self.facts['distribution_release'] = release.groups()[0]
|
||||
elif 'enterprise' in data.lower():
|
||||
elif 'enterprise' in data.lower() and 'VERSION_ID' in line:
|
||||
release = re.search('^VERSION_ID="?[0-9]+\.?([0-9]*)"?', line) # SLES doesn't got funny release names
|
||||
if release:
|
||||
if release.group(1):
|
||||
release = release.group(1)
|
||||
else:
|
||||
release = "0" # no minor number, so it is the first release
|
||||
|
|
Loading…
Reference in a new issue