mirror of
https://github.com/cool-RR/PySnooper.git
synced 2026-01-23 02:14:04 +00:00
Bugfix: don't try to snoop on coroutines
This commit is contained in:
parent
8d864d0c99
commit
337b6f20db
1 changed files with 5 additions and 0 deletions
|
|
@ -234,6 +234,11 @@ class Tracer:
|
|||
|
||||
def _wrap_class(self, cls):
|
||||
for attr_name, attr in cls.__dict__.items():
|
||||
# Coroutines are functions, but snooping them is not supported
|
||||
# at the moment
|
||||
if pycompat.iscoroutinefunction(attr):
|
||||
continue
|
||||
|
||||
if inspect.isfunction(attr):
|
||||
setattr(cls, attr_name, self._wrap_function(attr))
|
||||
return cls
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue