瀏覽代碼

deploy-ng: fix run error with frozen attr module

rdb 7 年之前
父節點
當前提交
ea832efb81
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      direct/src/showutil/FreezeTool.py

+ 4 - 1
direct/src/showutil/FreezeTool.py

@@ -89,11 +89,14 @@ overrideModules = {
     # lines from the main executable, which we don't want.
     'linecache': """__all__ = ["getline", "clearcache", "checkcache"]
 
+cache = {}
+
 def getline(filename, lineno, module_globals=None):
     return ''
 
 def clearcache():
-    pass
+    global cache
+    cache = {}
 
 def getlines(filename, module_globals=None):
     return []