Skip to content

Commit

Permalink
Code review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tshalvi committed Jun 11, 2024
1 parent 2599b79 commit 77ec2d9
Showing 1 changed file with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -267,13 +267,11 @@ def get_cpld_component_list(cls):
@classmethod
@utils.read_only_cache()
def is_module_host_management_mode(cls):
sai_profile_file_syncd = os.path.join('/tmp/', 'sai.profile')
if os.path.exists(sai_profile_file_syncd):
data = utils.read_key_value_file(sai_profile_file_syncd, delimeter='=')
return data.get('SAI_INDEPENDENT_MODULE_MODE') == '1'
from sonic_py_common import device_info
_, hwsku_dir = device_info.get_paths_to_platform_and_hwsku_dirs()
sai_profile_file = os.path.join(hwsku_dir, 'sai.profile')
sai_profile_file = '/tmp/sai.profile'
if not os.path.exists(sai_profile_file):
from sonic_py_common import device_info
_, hwsku_dir = device_info.get_paths_to_platform_and_hwsku_dirs()
sai_profile_file = os.path.join(hwsku_dir, 'sai.profile')
data = utils.read_key_value_file(sai_profile_file, delimeter='=')
return data.get('SAI_INDEPENDENT_MODULE_MODE') == '1'

Expand Down

0 comments on commit 77ec2d9

Please sign in to comment.