Skip to content

Commit

Permalink
fixing the comments
Browse files Browse the repository at this point in the history
Signed-off-by: vaibhav-dahiya <[email protected]>
  • Loading branch information
vdahiya12 committed Oct 11, 2020
1 parent 2a20c28 commit 166603d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/sonic-py-common/sonic_py_common/device_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,8 @@ def get_path_to_port_config_file(hwsku=None, asic=None):
if os.path.isfile(os.path.join(platform_path, PLATFORM_JSON_FILE)):
json_file = os.path.join(platform_path, PLATFORM_JSON_FILE)
platform_data = json.loads(open(json_file).read())
if len(platform_data.get("interfaces")) > 0:
interfaces = platform_data.get('interfaces', None)
if interfaces and len(interfaces) > 0:
port_config_candidates.append(os.path.join(platform_path, PLATFORM_JSON_FILE))

# Check for 'port_config.ini' file presence in a few locations
Expand Down

0 comments on commit 166603d

Please sign in to comment.