diff --git a/sfputil/main.py b/sfputil/main.py index 89cd5fcfdf..6efc0bde2a 100644 --- a/sfputil/main.py +++ b/sfputil/main.py @@ -32,7 +32,8 @@ # Global platform-specific sfputil class instance platform_sfputil = None - +PLATFORM_JSON = 'platform.json' +PORT_CONFIG_INI = 'port_config.ini' # ========================== Syslog wrappers ========================== @@ -329,14 +330,13 @@ def get_path_to_port_config_file(): hwsku_path = "/".join([platform_path, hwsku]) # First check for the presence of the new 'port_config.ini' file - port_config_file_path = "/".join([hwsku_path, "port_config.ini"]) + port_config_file_path = "/".join([platform_path, PLATFORM_JSON]) if not os.path.isfile(port_config_file_path): - # port_config.ini doesn't exist. Try loading the legacy 'portmap.ini' file - port_config_file_path = "/".join([hwsku_path, "portmap.ini"]) + # platform.json doesn't exist. Try loading the legacy 'port_config.ini' file + port_config_file_path = "/".join([hwsku_path, PORT_CONFIG_INI]) return port_config_file_path - # Loads platform specific sfputil module from source def load_platform_sfputil(): global platform_sfputil