[intranet|squeeze] On enlève le déprécié
Ignore-this: d0485c9ec2225694207cef0b5b733a08 darcs-hash:20120212223013-28565-3bd4cb29bcee856ac8ab038d7b4e672e73f19914.gz
This commit is contained in:
parent
18e313470c
commit
ce8c817aca
6 changed files with 10 additions and 4 deletions
|
@ -30,6 +30,7 @@ make_path = os.path.join
|
|||
import crans.utils.exceptions
|
||||
from ClassesIntranet.AuthorisationsManager import setDroits
|
||||
from crans.mail import quickSend
|
||||
import imp
|
||||
|
||||
class Intranet:
|
||||
# ######################################################## #
|
||||
|
@ -48,10 +49,10 @@ class Intranet:
|
|||
# faire ici l'importation
|
||||
# importer le fichier main.py
|
||||
try:
|
||||
#module_path = MODULES_DIR + un_module + "/main"
|
||||
module_path = make_path(un_module, "main")
|
||||
# import n'aime pas les chemins absolus !!
|
||||
mon_module = __import__(module_path)
|
||||
#module_path = MODULES_DIR + un_module
|
||||
module_path = make_path(MODULES_DIR,un_module)
|
||||
f, filename, desc = imp.find_module('main', [module_path])
|
||||
mon_module = imp.load_module('main', f, filename, desc)
|
||||
module_root = mon_module.main()
|
||||
# on ajoute la classe a l'arborescence de cherrypy :
|
||||
setattr( self, un_module, module_root)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue