Skip to content

Commit

Permalink
#2285 Changed importing importlib
Browse files Browse the repository at this point in the history
  • Loading branch information
Howard Soh committed Apr 10, 2023
1 parent 3074aa8 commit ddfe1c3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/python/pyembed/python_embedding.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import os
import sys
import importlib
from importlib import util as import_util

class pyembed_tools():

Expand Down Expand Up @@ -78,8 +78,8 @@ def call_python(argv):

user_base = os.path.basename(pyembed_module_name).replace('.py','')

spec = importlib.util.spec_from_file_location(user_base, pyembed_module_name)
met_in = importlib.util.module_from_spec(spec)
spec = import_util.spec_from_file_location(user_base, pyembed_module_name)
met_in = import_util.module_from_spec(spec)
spec.loader.exec_module(met_in)
return met_in

Expand Down

0 comments on commit ddfe1c3

Please sign in to comment.