diff options
author | nat-goodspeed <nat@lindenlab.com> | 2018-05-07 13:45:00 -0400 |
---|---|---|
committer | Sergey Shepelev <temotor@gmail.com> | 2018-05-07 20:45:00 +0300 |
commit | 705809f3b2fcf1895a655ccc8c2d26260f27a3de (patch) | |
tree | 34328e95d0dca5c196e596200513f1afc8253f55 /tests/subprocess_test.py | |
parent | b40e18db826c9c828382dc2a0ca4f4013d8aae5a (diff) | |
download | eventlet-705809f3b2fcf1895a655ccc8c2d26260f27a3de.tar.gz |
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 #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.
Diffstat (limited to 'tests/subprocess_test.py')
0 files changed, 0 insertions, 0 deletions