Skip to content

Commit 6d5cc81

Browse files
committed
bah
1 parent 216b8b9 commit 6d5cc81

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎v3/pg_logger.py‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1109,6 +1109,11 @@ def _runscript(self, script_str, custom_globals=None):
11091109
# 'path' is needed for __restricted_import__ to work
11101110
if a != 'path':
11111111
delattr(sys.modules['os'], a)
1112+
# ppl can dig up trashed objects with gc.get_objects()
1113+
import gc
1114+
for a in dir(sys.modules['gc']):
1115+
delattr(sys.modules['gc'], a)
1116+
del sys.modules['gc']
11121117

11131118
# sys.modules contains an in-memory cache of already-loaded
11141119
# modules, so if you delete modules from here, they will

0 commit comments

Comments
 (0)