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
83b8570f
Commit
83b8570f
authored
Apr 04, 2011
by
Denis Bilenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: use handle_error instead of traceback.print_exc to log the errors
parent
f1536a41
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
9 deletions
+1
-9
gevent/server.py
gevent/server.py
+1
-9
No files found.
gevent/server.py
View file @
83b8570f
...
...
@@ -2,7 +2,6 @@
"""TCP/SSL server"""
import
sys
import
errno
import
traceback
from
gevent
import
socket
from
gevent.baseserver
import
BaseServer
from
gevent.hub
import
get_hub
...
...
@@ -123,19 +122,12 @@ class StreamServer(BaseServer):
spawn
(
self
.
_handle
,
client_socket
,
address
)
return
except
:
traceback
.
print_exc
(
)
self
.
loop
.
handle_error
((
address
,
self
),
*
sys
.
exc_info
()
)
ex
=
sys
.
exc_info
()[
1
]
if
self
.
is_fatal_error
(
ex
):
self
.
kill
()
sys
.
stderr
.
write
(
'ERROR: %s failed with %s
\
n
'
%
(
self
,
str
(
ex
)
or
repr
(
ex
)))
return
try
:
if
address
is
None
:
sys
.
stderr
.
write
(
'%s: Failed.
\
n
'
%
(
self
,
))
else
:
sys
.
stderr
.
write
(
'%s: Failed to handle request from %s
\
n
'
%
(
self
,
address
,
))
except
Exception
:
traceback
.
print_exc
()
if
self
.
delay
>=
0
:
self
.
stop_accepting
()
self
.
_start_accepting_timer
=
self
.
loop
.
timer
(
self
.
delay
)
...
...
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