forked from eventlet/eventlet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
greendns: full comment lines were not skipped; Thanks to nat-goodspeed
`greendns.HostsResolver.LINES_RE` doesn't admit the possibility of a comment starting at the beginning of a line. This has been ignored since `is_ipv4_addr()` and `is_ipv6_addr()` catch `dns.exception.SyntaxError` and return `False`. But in a runtime environment that encounters eventlet#413, `dns.exception.SyntaxError` is not caught, and the import fails. Changing '+' to '*' allows `HostsResolver._readlines()` to recognize and skip comment lines. greendns.HostsResolver._readlines(), a purely internal method, now returns an itertools generator rather than a list. Change relevant asserts to build a list before comparing.
- Loading branch information
1 parent
b40e18d
commit 705809f
Showing
2 changed files
with
14 additions
and
8 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