PackageManager: Fix Template module injection
parent
ed0ffd3d66
commit
b32507cf63
|
@ -48,8 +48,8 @@ class Package:
|
|||
|
||||
def __load(self):
|
||||
print("Package.__load(): Path=%s" % (self.__path,))
|
||||
setattr( self.__mod, "Templates", hserver.TemplateModule("%s/templates" % (self.__path,)) )
|
||||
self.__modules["%s.Templates" % (self.__modpath,)] = self.__mod.Templates
|
||||
self.__templates = hserver.TemplateModule("%s/templates" % (self.__path,))
|
||||
self.__modules["%s.Templates" % (self.__modpath,)] = self.__templates
|
||||
|
||||
if os.path.exists("%s/package.conf" % (self.__path,)):
|
||||
pcn = "%s/package.conf" % (self.__path,)
|
||||
|
@ -182,6 +182,9 @@ class Package:
|
|||
f.close()
|
||||
|
||||
co = compile( src, mod.__file__, "exec" )
|
||||
|
||||
mod.Templates = self.__templates
|
||||
|
||||
exec( co, mod.__dict__ )
|
||||
|
||||
def __export(self, name, o, glob=False):
|
||||
|
|
Loading…
Reference in New Issue