Skip to content
Snippets Groups Projects
Unverified Commit bd827c30 authored by Logan's avatar Logan Committed by GitHub
Browse files

remove exec from download_integration (#13523)

parent ece8f2dd
No related branches found
No related tags found
No related merge requests found
...@@ -18,7 +18,6 @@ def download_integration(module_str: str, module_import_str: str, cls_name: str) ...@@ -18,7 +18,6 @@ def download_integration(module_str: str, module_import_str: str, cls_name: str)
raise Exception(f"Failed to pip install `{module_str}`") from e raise Exception(f"Failed to pip install `{module_str}`") from e
try: try:
exec(f"from {module_import_str} import {cls_name}")
module_spec = importlib.util.find_spec(module_import_str) module_spec = importlib.util.find_spec(module_import_str)
module = importlib.util.module_from_spec(module_spec) module = importlib.util.module_from_spec(module_spec)
module_spec.loader.exec_module(module) module_spec.loader.exec_module(module)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment