add __file__ to context before loading site_cubicweb.py stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 01 Jul 2009 16:41:30 +0200
branchstable
changeset 2220 64aace08ae2f
parent 2219 bb5098e74b82
child 2221 d9b85a7b0bdd
add __file__ to context before loading site_cubicweb.py
cwconfig.py
--- a/cwconfig.py	Wed Jul 01 16:40:35 2009 +0200
+++ b/cwconfig.py	Wed Jul 01 16:41:30 2009 +0200
@@ -743,7 +743,7 @@
                     self.warning('site_erudi.py is deprecated, should be renamed to site_cubicweb.py')
 
     def _load_site_cubicweb(self, sitefile):
-        context = {}
+        context = {'__file__': sitefile}
         execfile(sitefile, context, context)
         self.info('%s loaded', sitefile)
         # cube specific options