Fix in collectd pacemaker monitoring plugin
readlines() function in Python 3 returns list of byte objects instead of list of str objects. Since we shifted to centos 8 for collectd containers, Python 3 is used by collectd Python plugins. This patch fixes the issue that occured because of the change, by decoding the byte objects to utf-8. Change-Id: Ifff2c7c6c7d9adfcb524ed279e2a82aedfd4ce30
This commit is contained in:
parent
36b67e7068
commit
de45b97f98
@ -22,7 +22,7 @@ def read_func():
|
||||
os.system('''echo "pcs status" > '''+PIPE_FILE_PATH)
|
||||
|
||||
with open(LOG_FILE_PATH, 'rb') as f:
|
||||
full_output = f.readlines()
|
||||
full_output = [line.decode("utf-8") for line in f.readlines()]
|
||||
|
||||
latest_output = []
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user