Skip to content

Commit

Permalink
input: make imported plugin modules known
Browse files Browse the repository at this point in the history
We must make the imported plugin modules visible under their mangled
name. Otherwise the pickling of projects may fail because the name is
unknown to the import machinery.

Fixes #459.
  • Loading branch information
jkloetzke committed Apr 12, 2022
1 parent 35226ef commit bf47407
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pym/bob/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -3309,6 +3309,7 @@ def __loadPlugin(self, mangledName, fileName, name):
spec = spec_from_loader(mangledName, loader)
mod = module_from_spec(spec)
loader.exec_module(mod)
sys.modules[spec.name] = mod
except SyntaxError as e:
import traceback
raise ParseError("Error loading plugin "+fileName+": "+str(e),
Expand Down

0 comments on commit bf47407

Please sign in to comment.