Skip to content

Commit

Permalink
Update pilotTools.py
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisburr authored Apr 18, 2024
1 parent 0397cba commit 746a6ba
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Pilot/pilotTools.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def load_module_from_path(module_name, path_to_module):
import imp
fp, pathname, description = imp.find_module(module_name, [path_to_module])
try:
module = imp.load_module('module_name', fp, pathname, description)
return imp.load_module(module_name, fp, pathname, description)
finally:
if fp:
fp.close()
Expand Down Expand Up @@ -396,9 +396,9 @@ def __recurseImport(self, modName, parentModule=None, hideExceptions=False):
modName = modName.split(".")
try:
if parentModule:
module = load_module_from_path(modName[0], parentModule.__path__)
impModule = load_module_from_path(modName[0], parentModule.__path__)
else:
module = import_module(modName[0])
impModule = import_module(modName[0])
except ImportError as excp:
if str(excp).find("No module named %s" % modName[0]) == 0:
return None, None
Expand Down

0 comments on commit 746a6ba

Please sign in to comment.