-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
util.py: revert leading zeros logic, add is_valid_pfx
the previously added check for leading zeros picks up private networks, so it's not exactly what we want here. Instead, separate the format_pfx and is_valid_pfx intents and add tests accordingly. format_pfx checks whether the existing prefix can be coerced to a string and returns it. is_valid_pfx simply checks whether it's a valid pfx or not.
- Loading branch information
Showing
2 changed files
with
30 additions
and
19 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