From c7157ef2d170b2264a70332fc45ba4d296ad295c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Obih=C3=B6rnchen?= Date: Thu, 18 Apr 2019 15:22:06 +0200 Subject: [PATCH] Fix reventlog for python2 python2 does not have encoding and errors in open() --- xCAT-openbmc-py/lib/python/agent/hwctl/openbmc_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xCAT-openbmc-py/lib/python/agent/hwctl/openbmc_client.py b/xCAT-openbmc-py/lib/python/agent/hwctl/openbmc_client.py index c6a5e5a07..06631bfce 100644 --- a/xCAT-openbmc-py/lib/python/agent/hwctl/openbmc_client.py +++ b/xCAT-openbmc-py/lib/python/agent/hwctl/openbmc_client.py @@ -661,7 +661,7 @@ class OpenBMCRest(object): # Check if policy table file is there ras_event_mapping = {} if os.path.isfile(RAS_POLICY_TABLE): - with open(RAS_POLICY_TABLE, encoding="utf8", errors='ignore') as data_file: + with open(RAS_POLICY_TABLE) as data_file: policy_hash = json.load(data_file) if policy_hash: ras_event_mapping = policy_hash['events']