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

SCons: Fix Godot detection in custom modules logic
This commit is contained in:
Rémi Verschelde 2021-02-11 18:13:23 +01:00 committed by GitHub
commit e5bb89cdd5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -174,9 +174,7 @@ def detect_modules(search_path, recursive=False):
version_path = os.path.join(path, "version.py")
if os.path.exists(version_path):
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 False