Correct an issue with Python 3.4 and monitored list issue

This commit is contained in:
nicolargo 2015-09-20 07:55:14 +02:00
parent cc2c680226
commit 7d4e713016

View File

@ -141,7 +141,7 @@ class MonitorList(object):
except Exception: except Exception:
self.__monitor_list[i]['result'] = 'Cannot execute command' self.__monitor_list[i]['result'] = 'Cannot execute command'
# Only save the first line # Only save the first line
self.__monitor_list[i]['result'] = self.__monitor_list[i]['result'].split('\n')[0] self.__monitor_list[i]['result'] = self.__monitor_list[i]['result'].decode('utf-8').split('\n')[0]
if self.command(i) is None or self.__monitor_list[i]['result'] == '': if self.command(i) is None or self.__monitor_list[i]['result'] == '':
# If there is no command specified in the conf file # If there is no command specified in the conf file