Fix SLES platform detection
Surprisingly SUSE Linux Enterprise Server 12 SP2 returns 'SUSE Linux Enterprise Server ' as its distribution identifier (note the trailing space). This change is meant to fix it for now and ever. Also fixed a misspelled log message. Change-Id: I9ae02ee11ff28265a2a72754dd721f060f19b7ec
This commit is contained in:
parent
c4d38ef4c5
commit
1bb63b85b1
@ -22,9 +22,9 @@ def detect_init(*args, **kwargs):
|
|||||||
'centos linux', 'red hat enterprise linux server',
|
'centos linux', 'red hat enterprise linux server',
|
||||||
'suse linux enterprise server'
|
'suse linux enterprise server'
|
||||||
]
|
]
|
||||||
flavor = platform.linux_distribution()[0]
|
flavor = platform.linux_distribution()[0].strip()
|
||||||
if flavor.lower() not in supported_linux_flavors:
|
if flavor.lower() not in supported_linux_flavors:
|
||||||
log.warn('{0} is not a support Linux distribution'.format(flavor))
|
log.warn('{0} is not a supported Linux distribution'.format(flavor))
|
||||||
return detect_linux_init(*args, **kwargs)
|
return detect_linux_init(*args, **kwargs)
|
||||||
else:
|
else:
|
||||||
print("{0} is not currently supported by the Monasca Agent".format(detected_os))
|
print("{0} is not currently supported by the Monasca Agent".format(detected_os))
|
||||||
|
Loading…
Reference in New Issue
Block a user