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
8be65f8b
Commit
8be65f8b
authored
Oct 28, 2014
by
Joe Jevnik
Committed by
Joe Jevnik
Mar 11, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DEV: Fixes the reprs of baseserver which were recursive when handle was
an instancemethod of the baseserver.
parent
72119c8c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
6 deletions
+19
-6
gevent/baseserver.py
gevent/baseserver.py
+19
-6
No files found.
gevent/baseserver.py
View file @
8be65f8b
...
...
@@ -3,7 +3,7 @@
import
sys
import
_socket
import
errno
from
gevent.greenlet
import
Greenlet
,
getfuncname
from
gevent.greenlet
import
Greenlet
from
gevent.event
import
Event
from
gevent.hub
import
string_types
,
integer_types
,
get_hub
,
xrange
...
...
@@ -198,12 +198,25 @@ class BaseServer(object):
result
+=
'address=%s'
%
(
self
.
address
,
)
except
Exception
as
ex
:
result
+=
str
(
ex
)
or
'<error>'
handle
=
self
.
__dict__
.
get
(
'handle'
)
try
:
handle
=
getfuncname
(
self
.
__dict__
[
'handle'
])
except
Exception
:
handle
=
None
if
handle
is
not
None
:
result
+=
' handle='
+
handle
if
handle
is
not
None
:
fself
=
getattr
(
handle
,
'__self__'
)
if
fself
is
self
:
# Checks the __self__ of the handle in case it is a bound
# method of self to prevent recursivly defined reprs.
handle_repr
=
'<bound method %s.%s of self>'
%
(
self
.
__class__
.
__name__
,
handle
.
__name__
,
)
else
:
handle_repr
=
repr
(
handle
)
result
+=
' handle='
+
handle_repr
except
AttributeError
:
pass
return
result
@
property
...
...
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