Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If a trie is empty, find_all should return [] #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Huji
Copy link

@Huji Huji commented Jul 13, 2019

If a trie is empty, there is no point in validating its IP type or running any of the rest of the logic. Indeed, if you validate an IP v6 against an empty trie, you will get an error (because self.v6 always defaults to false, and will not be changed until at least one IP v6 item is added to the trie).

Fixes #2

If a trie is empty, there is no point in validating its IP type or running any of the rest of the logic. Indeed, if you validate an IP v6 against an empty trie, you will get an error (because self.v6 always defaults to false, and will not be changed until at least one IP v6 item is added to the trie).
@Huji
Copy link
Author

Huji commented Jul 31, 2019

Created a new PR out of a branch

@Huji Huji closed this Jul 31, 2019
@Huji Huji reopened this Feb 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Looking up an IPv6 in an empty trie results in error
1 participant