From a18ea8297423c6a11d7115b2d3cda4927499f944 Mon Sep 17 00:00:00 2001 From: Alex Root Junior Date: Wed, 24 Jan 2018 02:33:42 +0200 Subject: [PATCH] Fixed overlapping of names in context module. --- aiogram/utils/context.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/aiogram/utils/context.py b/aiogram/utils/context.py index b31c71c0..ea922b48 100644 --- a/aiogram/utils/context.py +++ b/aiogram/utils/context.py @@ -46,10 +46,10 @@ def get_current_state() -> typing.Dict: :rtype: :obj:`dict` """ task = asyncio.Task.current_task() - context = getattr(task, 'context', None) - if context is None: - context = task.context = {} - return context + context_ = getattr(task, 'context', None) + if context_ is None: + context_ = task.context = {} + return context_ def get_value(key, default=None):