This commit is contained in:
Solvik 2020-07-28 16:54:20 +00:00 committed by GitHub
commit dc56ebaf18
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 134 additions and 17 deletions

View file

@ -37,7 +37,12 @@ class IPMI():
"""
def __init__(self):
self.ret, self.output = subprocess.getstatusoutput('ipmitool lan print')
try:
self.ret, self.output = subprocess.getstatusoutput('ipmitool lan print')
except Exception as e:
self.ret = 42
self.output = str(e)
if self.ret != 0:
logging.error('Cannot get ipmi info: {}'.format(self.output))