@@ -27,7 +27,7 @@ def load_config_file(self):
27
27
config_file = "{}/pcie{}.yaml" .format (self .config_path , conf_rev )
28
28
try :
29
29
with open (config_file ) as conf_file :
30
- self .confInfo = yaml .load (conf_file )
30
+ self .confInfo = yaml .safe_load (conf_file )
31
31
except IOError as e :
32
32
print ("Error: {}" .format (str (e )))
33
33
print ("Not found config file, please add a config file manually, or generate it by running [pcieutil pcie_generate]" )
@@ -101,9 +101,9 @@ def get_pcie_check(self):
101
101
return self .confInfo
102
102
103
103
# return AER stats of PCIe device
104
- def get_pcie_aer_stats (self , domain = 0 , bus = 0 , device = 0 , func = 0 ):
104
+ def get_pcie_aer_stats (self , domain = 0 , bus = 0 , dev = 0 , func = 0 ):
105
105
aer_stats = {'correctable' : {}, 'fatal' : {}, 'non_fatal' : {}}
106
- dev_path = os .path .join ('/sys/bus/pci/devices' , '%04x:%02x:%02x.%d' % (domain , bus , device , func ))
106
+ dev_path = os .path .join ('/sys/bus/pci/devices' , '%04x:%02x:%02x.%d' % (domain , bus , dev , func ))
107
107
108
108
# construct AER sysfs filepath
109
109
correctable_path = os .path .join (dev_path , "aer_dev_correctable" )
0 commit comments