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
1ffa8e05
Commit
1ffa8e05
authored
Jan 31, 2012
by
Denis Bilenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
resolver_thread: do not print stack traces for exceptions
parent
6da736e0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
gevent/resolver_thread.py
gevent/resolver_thread.py
+7
-5
No files found.
gevent/resolver_thread.py
View file @
1ffa8e05
...
@@ -8,6 +8,8 @@ __all__ = ['Resolver']
...
@@ -8,6 +8,8 @@ __all__ = ['Resolver']
class
Resolver
(
object
):
class
Resolver
(
object
):
expected_errors
=
(
_socket
.
error
,
TypeError
)
def
__init__
(
self
,
hub
=
None
):
def
__init__
(
self
,
hub
=
None
):
if
hub
is
None
:
if
hub
is
None
:
hub
=
get_hub
()
hub
=
get_hub
()
...
@@ -20,16 +22,16 @@ class Resolver(object):
...
@@ -20,16 +22,16 @@ class Resolver(object):
# below are thread-safe in Python, even if they are not thread-safe in C.
# below are thread-safe in Python, even if they are not thread-safe in C.
def
gethostbyname
(
self
,
*
args
):
def
gethostbyname
(
self
,
*
args
):
return
self
.
pool
.
apply
(
_socket
.
gethostbyname
,
args
)
return
self
.
pool
.
apply
_e
(
self
.
expected_errors
,
_socket
.
gethostbyname
,
args
)
def
gethostbyname_ex
(
self
,
*
args
):
def
gethostbyname_ex
(
self
,
*
args
):
return
self
.
pool
.
apply
(
_socket
.
gethostbyname_ex
,
args
)
return
self
.
pool
.
apply
_e
(
self
.
expected_errors
,
_socket
.
gethostbyname_ex
,
args
)
def
getaddrinfo
(
self
,
*
args
,
**
kwargs
):
def
getaddrinfo
(
self
,
*
args
,
**
kwargs
):
return
self
.
pool
.
apply
(
_socket
.
getaddrinfo
,
args
,
kwargs
)
return
self
.
pool
.
apply
_e
(
self
.
expected_errors
,
_socket
.
getaddrinfo
,
args
,
kwargs
)
def
gethostbyaddr
(
self
,
*
args
,
**
kwargs
):
def
gethostbyaddr
(
self
,
*
args
,
**
kwargs
):
return
self
.
pool
.
apply
(
_socket
.
gethostbyaddr
,
args
,
kwargs
)
return
self
.
pool
.
apply
_e
(
self
.
expected_errors
,
_socket
.
gethostbyaddr
,
args
,
kwargs
)
def
getnameinfo
(
self
,
*
args
,
**
kwargs
):
def
getnameinfo
(
self
,
*
args
,
**
kwargs
):
return
self
.
pool
.
apply
(
_socket
.
getnameinfo
,
args
,
kwargs
)
return
self
.
pool
.
apply
_e
(
self
.
expected_errors
,
_socket
.
getnameinfo
,
args
,
kwargs
)
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