Fixed overlapping of names in context module.

This commit is contained in:
Alex Root Junior 2018-01-24 02:33:42 +02:00
parent 221ce362fc
commit a18ea82974

View file

@ -46,10 +46,10 @@ def get_current_state() -> typing.Dict:
:rtype: :obj:`dict` :rtype: :obj:`dict`
""" """
task = asyncio.Task.current_task() task = asyncio.Task.current_task()
context = getattr(task, 'context', None) context_ = getattr(task, 'context', None)
if context is None: if context_ is None:
context = task.context = {} context_ = task.context = {}
return context return context_
def get_value(key, default=None): def get_value(key, default=None):