Skip to content

Commit f43799f

Browse files
authored
Don't redefine variable in containing scope (#48)
This fixes #46
1 parent e302f3c commit f43799f

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/asfquart/auth.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def require(
109109
# Require either ASF member OR project chair, but also require MFA enabled in any case.
110110
"""
111111

112-
async def require_wrapper(func: typing.Callable, all_of=None, any_of=None, *args, **kwargs):
112+
async def require_wrapper(original_func: typing.Callable, all_of=None, any_of=None, *args, **kwargs):
113113
client_session = await session.read()
114114
errors_list = []
115115
# First off, test if we have a session at all.
@@ -140,8 +140,8 @@ async def require_wrapper(func: typing.Callable, all_of=None, any_of=None, *args
140140
if errors_list:
141141
raise AuthenticationFailed("\n".join(errors_list))
142142
if args or kwargs:
143-
return await func(*args, **kwargs)
144-
return await func()
143+
return await original_func(*args, **kwargs)
144+
return await original_func()
145145

146146
# If decorator is passed without arguments, func will be an async function
147147
# In this case, we will return a simple wrapper.

0 commit comments

Comments
 (0)