Commit faf1ec7c authored by Jason Madden's avatar Jason Madden

ares fixes.

parent 4550374f
......@@ -13,7 +13,6 @@ from _socket import EAI_NONAME
from gevent._compat import text_type
from gevent._compat import integer_types
from gevent._compat import PY3
from gevent.hub import Waiter
from gevent.hub import get_hub
......@@ -329,7 +328,7 @@ class Resolver(AbstractResolver):
self.cares.getnameinfo(waiter, address, flags)
node, service = waiter.get()
if service is None and PY3:
if service is None:
# ares docs: "If the query did not complete
# successfully, or one of the values was not
# requested, node or service will be NULL ". Python 2
......
......@@ -397,6 +397,12 @@ class TestCase(greentest.TestCase):
# one resolver than we do with the other resolver.
# So as long as they have some subset in common,
# we'll take it.
errors = isinstance(real_result, Exception) + isinstance(gevent_result, Exception)
if errors == 2:
return True
if errors == 1:
return False
if not set(real_result).isdisjoint(set(gevent_result)):
return True
return self._generic_compare_results(real_result, gevent_result, func_name)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment