mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-21 11:12:04 +00:00
Fix reventlog for python2
python2 does not have encoding and errors in open()
This commit is contained in:
parent
3967969226
commit
c7157ef2d1
@ -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']
|
||||
|
Loading…
x
Reference in New Issue
Block a user