File tree 1 file changed +3
-4
lines changed
1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 14
14
15
15
import swsssdk
16
16
from sonic_py_common .daemon_base import DaemonBase
17
- from sonic_py_common . device_info import get_platform
17
+ from sonic_py_common import device_info
18
18
except ImportError as e :
19
19
raise ImportError (str (e ) + " - required module not found" )
20
20
@@ -26,7 +26,6 @@ SYSLOG_IDENTIFIER = "pcied"
26
26
PCIE_RESULT_REGEX = "PCIe Device Checking All Test"
27
27
PCIE_TABLE_NAME = "PCIE_STATUS"
28
28
29
- PLATFORM_ROOT_PATH = '/usr/share/sonic/device'
30
29
PCIE_CONF_FILE = 'pcie.yaml'
31
30
32
31
PCIED_MAIN_THREAD_SLEEP_SECS = 60
@@ -41,8 +40,8 @@ class DaemonPcied(DaemonBase):
41
40
def __init__ (self , log_identifier ):
42
41
super (DaemonPcied , self ).__init__ (log_identifier )
43
42
44
- platform = get_platform ()
45
- pciefilePath = os .path .join (PLATFORM_ROOT_PATH , platform , "plugins" , PCIE_CONF_FILE )
43
+ ( platform_path , _ ) = device_info . get_paths_to_platform_and_hwsku_dirs ()
44
+ pciefilePath = os .path .join (platform_path , "plugins" , PCIE_CONF_FILE )
46
45
sys .path .append (os .path .abspath (pciefilePath ))
47
46
if not os .path .exists (pciefilePath ):
48
47
self .log_error ("Platform pcie configuration file doesn't exist! Exiting ..." )
You can’t perform that action at this time.
0 commit comments