Commit 41dd39ac authored by Denis Bilenko's avatar Denis Bilenko

loop.__repr__: actually know if 'activecnt' is present at compile time

parent 2b5d570e
......@@ -342,9 +342,9 @@ cdef public class loop [object PyGeventLoopObject, type PyGeventLoop_Type]:
def __repr__(self):
args = (self.__class__.__name__, id(self), self.default, self.backend)
result = '<%s at 0x%x default=%r backend=%r' % args
activecnt = getattr(self, 'activecnt', None)
if activecnt is not None:
result += ' activecnt=%r' % activecnt
#ifdef EV_STANDALONE
result += ' activecnt=%r' % self.activecnt
#endif
return result + '>'
property default:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment