X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=n2vc%2Floggable.py;h=d129b4b6757b4ef64a4a3d069a0dd7487c6e7e18;hb=3bc59c1786633d06fd9d8016e3ba36a611e635f4;hp=cbaa116b6ad40f83ae3d7235e09eac09c235d94f;hpb=2b2dc52b95660e3b4a5564914aa1f490d88a2b9f;p=osm%2FN2VC.git diff --git a/n2vc/loggable.py b/n2vc/loggable.py index cbaa116..d129b4b 100644 --- a/n2vc/loggable.py +++ b/n2vc/loggable.py @@ -131,7 +131,7 @@ class Loggable: coroutine_id = "" if include_coroutine: try: - if asyncio.Task.current_task() is not None: + if asyncio.current_task() is not None: def print_cor_name(c): import inspect @@ -143,7 +143,7 @@ class Loggable: except Exception: pass - coro = asyncio.Task.current_task()._coro + coro = asyncio.current_task()._coro coroutine_id = "coro-{} {}()".format( hex(id(coro))[2:], print_cor_name(coro) )