File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414
1515 import swsssdk
1616 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
1818except ImportError as e :
1919 raise ImportError (str (e ) + " - required module not found" )
2020
@@ -26,7 +26,6 @@ SYSLOG_IDENTIFIER = "pcied"
2626PCIE_RESULT_REGEX = "PCIe Device Checking All Test"
2727PCIE_TABLE_NAME = "PCIE_STATUS"
2828
29- PLATFORM_ROOT_PATH = '/usr/share/sonic/device'
3029PCIE_CONF_FILE = 'pcie.yaml'
3130
3231PCIED_MAIN_THREAD_SLEEP_SECS = 60
@@ -41,8 +40,8 @@ class DaemonPcied(DaemonBase):
4140 def __init__ (self , log_identifier ):
4241 super (DaemonPcied , self ).__init__ (log_identifier )
4342
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 )
4645 sys .path .append (os .path .abspath (pciefilePath ))
4746 if not os .path .exists (pciefilePath ):
4847 self .log_error ("Platform pcie configuration file doesn't exist! Exiting ..." )
You can’t perform that action at this time.
0 commit comments