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
fc72362e
Commit
fc72362e
authored
Jun 26, 2015
by
Jason Madden
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'non-recursive-reprs-of-baseserver' of
https://github.com/llllllllll/gevent
into pr501
parents
8960d0d8
8be65f8b
Changes
1
Show 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 @
fc72362e
...
...
@@ -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
...
...
@@ -206,12 +206,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
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