Fix for SLES 11.4, which has now also an /etc/os-release file.
This commit is contained in:
parent
92dd563a75
commit
00ccd2ee6e
1 changed files with 2 additions and 2 deletions
|
@ -418,9 +418,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