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