Add warning for some bug that I saw

Maybe one day someone will encounter it again and decide to fix it, but I'm lazy.
This commit is contained in:
Ruben D 2018-02-03 23:54:18 +01:00
parent a3ed385259
commit 7c291e36c9
No known key found for this signature in database
GPG key ID: 6B42C9465E304A62

View file

@ -121,7 +121,7 @@ class PostProcessingPlugin(QObject, Extension):
spec = importlib.util.spec_from_file_location(__name__ + "." + script_name, os.path.join(path, script_name + ".py")) spec = importlib.util.spec_from_file_location(__name__ + "." + script_name, os.path.join(path, script_name + ".py"))
loaded_script = importlib.util.module_from_spec(spec) loaded_script = importlib.util.module_from_spec(spec)
spec.loader.exec_module(loaded_script) spec.loader.exec_module(loaded_script)
sys.modules[script_name] = loaded_script sys.modules[script_name] = loaded_script #TODO: This could be a security risk. Overwrite any module with a user-provided name?
loaded_class = getattr(loaded_script, script_name) loaded_class = getattr(loaded_script, script_name)
temp_object = loaded_class() temp_object = loaded_class()