-
Notifications
You must be signed in to change notification settings - Fork 176
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[xcvrd] Gracefully handle improper 'specification_compliance' field; …
…also fix other potential bugs (#169) #### Description Gracefully handle improper 'specification_compliance' field; also fix other potential bugs and adjust some style #### Motivation and Context The 'specification_compliance' field of transceiver info is expected to be a string representation of a dictionary. However, there is a chance, upon some kind of platform issue that a vendor's platform API returns something like 'N/A'. In this case, xcrvd would crash. Rather than crash, xcvrd should handle this gracefully and log a warning message instead. Also fixed a couple potential bugs where `default_dict` was being compared to `0`, when it should have been `len(default_dict)` Also rename some constants using uppercase naming convention.
- Loading branch information
Showing
2 changed files
with
68 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters