mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
fix issue with redirecting the wrong object in the load loop
This commit is contained in:
parent
7de48e3d31
commit
da62361317
@ -1076,13 +1076,14 @@ class LazyLoader(salt.utils.lazy.LazyDict):
|
||||
if suffix == '.pyx':
|
||||
mod = self.pyximport.load_module(name, fpath, tempfile.gettempdir())
|
||||
if suffix == '.o':
|
||||
top_mod = __import__(fpath, globals(), locals(), [], -1)
|
||||
top_mod = __import__(fpath, globals(), locals(), [])
|
||||
comps = fpath.split('.')
|
||||
if len(comps) < 2:
|
||||
mod = top_mod
|
||||
else:
|
||||
mod = top_mod
|
||||
for subname in comps[1:]:
|
||||
mod = getattr(top_mod, subname)
|
||||
mod = getattr(mod, subname)
|
||||
else:
|
||||
desc = self.suffix_map[suffix]
|
||||
# if it is a directory, we dont open a file
|
||||
|
Loading…
Reference in New Issue
Block a user