Skip to content

Commit

Permalink
fix wrong code indent in sfputil (sonic-net#1808)
Browse files Browse the repository at this point in the history
Signed-off-by: Kebo Liu <kebol@nvidia.com>
  • Loading branch information
keboliu committed Sep 14, 2021
1 parent 47a9a0f commit c2c2354
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions sfputil/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,14 +265,14 @@ def convert_sfp_info_to_output_string(sfp_info_dict):
else:
output += '{}{}:\n'.format(indent, QSFP_DATA_MAP['specification_compliance'])

spec_compliance_dict = {}
try:
spec_compliance_dict = ast.literal_eval(sfp_info_dict['specification_compliance'])
sorted_compliance_key_table = natsorted(spec_compliance_dict)
for compliance_key in sorted_compliance_key_table:
output += '{}{}: {}\n'.format((indent * 2), compliance_key, spec_compliance_dict[compliance_key])
except ValueError as e:
output += '{}N/A\n'.format((indent * 2))
spec_compliance_dict = {}
try:
spec_compliance_dict = ast.literal_eval(sfp_info_dict['specification_compliance'])
sorted_compliance_key_table = natsorted(spec_compliance_dict)
for compliance_key in sorted_compliance_key_table:
output += '{}{}: {}\n'.format((indent * 2), compliance_key, spec_compliance_dict[compliance_key])
except ValueError as e:
output += '{}N/A\n'.format((indent * 2))
else:
output += '{}{}: {}\n'.format(indent, QSFP_DATA_MAP[key], sfp_info_dict[key])

Expand Down

0 comments on commit c2c2354

Please sign in to comment.