瀏覽代碼

Merge pull request #45901 from akien-mga/scons-fix-custom_modules-is_engine

SCons: Fix Godot detection in custom modules logic
Rémi Verschelde 4 年之前
父節點
當前提交
e5bb89cdd5
共有 1 個文件被更改,包括 1 次插入3 次删除
  1. 1 3
      methods.py

+ 1 - 3
methods.py

@@ -174,9 +174,7 @@ def detect_modules(search_path, recursive=False):
         version_path = os.path.join(path, "version.py")
         version_path = os.path.join(path, "version.py")
         if os.path.exists(version_path):
         if os.path.exists(version_path):
             with open(version_path) as f:
             with open(version_path) as f:
-                version = {}
-                exec(f.read(), version)
-                if version.get("short_name") == "godot":
+                if 'short_name = "godot"' in f.read():
                     return True
                     return True
         return False
         return False