mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #42708 from cro/dont_change_args_during_memoize
Do not change the arguments of the function when memoizing
This commit is contained in:
commit
dcf474c47c
1 changed files with 1 additions and 2 deletions
|
@ -251,9 +251,8 @@ def memoize(func):
|
|||
str_args.append(str(arg))
|
||||
else:
|
||||
str_args.append(arg)
|
||||
args = str_args
|
||||
|
||||
args_ = ','.join(list(args) + ['{0}={1}'.format(k, kwargs[k]) for k in sorted(kwargs)])
|
||||
args_ = ','.join(list(str_args) + ['{0}={1}'.format(k, kwargs[k]) for k in sorted(kwargs)])
|
||||
if args_ not in cache:
|
||||
cache[args_] = func(*args, **kwargs)
|
||||
return cache[args_]
|
||||
|
|
Loading…
Add table
Reference in a new issue