Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gevent
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gevent
Commits
3dceb29d
Commit
3dceb29d
authored
Jan 07, 2012
by
Denis Bilenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
resolver_ares.py: when ares.gethostbyname returns empty host list, raise gaierror
for compatibility with stdlib's socket module
parent
edb588ba
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
gevent/resolver_ares.py
gevent/resolver_ares.py
+5
-2
No files found.
gevent/resolver_ares.py
View file @
3dceb29d
...
...
@@ -50,7 +50,10 @@ class Resolver(object):
try
:
waiter
=
Waiter
(
self
.
hub
)
ares
.
gethostbyname
(
waiter
,
hostname
,
family
)
return
waiter
.
get
()
result
=
waiter
.
get
()
if
not
result
[
-
1
]:
raise
gaierror
(
-
5
,
'No address associated with hostname'
)
return
result
except
gaierror
:
if
ares
is
self
.
ares
:
raise
...
...
@@ -154,7 +157,7 @@ class Resolver(object):
result
+=
result4
+
result6
if
not
result
:
raise
error
(
'Internal error in %s'
%
ares
.
gethostbyname
)
raise
gaierror
(
-
5
,
'No address associated with hostname'
)
return
result
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment