mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Use shorter code for clear, as per cachedout
This commit is contained in:
parent
78ce7ff4e0
commit
23032f6d30
@ -116,10 +116,8 @@ def clear(name):
|
||||
'changes': {},
|
||||
'comment': '',
|
||||
'result': True}
|
||||
if name in __reg__ and isinstance(__reg__[name], set):
|
||||
__reg__[name] = {'val': set()}
|
||||
else:
|
||||
__reg__[name] = {'val': []}
|
||||
if name in __reg__:
|
||||
__reg__[name].clear()
|
||||
return ret
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user