mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-05-15 18:29:52 +00:00
[commands] Delete frame objects when done using them.
This commit is contained in:
parent
bbc78b29ae
commit
20e86973ea
@ -40,9 +40,13 @@ def _get_variable(name):
|
|||||||
stack = inspect.stack()
|
stack = inspect.stack()
|
||||||
try:
|
try:
|
||||||
for frames in stack:
|
for frames in stack:
|
||||||
current_locals = frames[0].f_locals
|
try:
|
||||||
if name in current_locals:
|
frame = frames[0]
|
||||||
return current_locals[name]
|
current_locals = frame.f_locals
|
||||||
|
if name in current_locals:
|
||||||
|
return current_locals[name]
|
||||||
|
finally:
|
||||||
|
del frame
|
||||||
finally:
|
finally:
|
||||||
del stack
|
del stack
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user