merge stable
authorAurelien Campeas <aurelien.campeas@logilab.fr>
Tue, 15 Dec 2009 17:01:33 +0100
branchstable
changeset 4123 c309d441c128
parent 4122 3c3d2a102d4c (current diff)
parent 4121 09622a18501c (diff)
child 4125 a32b0dc8575c
merge
--- a/cwconfig.py	Tue Dec 15 17:00:58 2009 +0100
+++ b/cwconfig.py	Tue Dec 15 17:01:33 2009 +0100
@@ -865,12 +865,12 @@
                     self.warning('site_erudi.py is deprecated, should be renamed to site_cubicweb.py')
 
     def _load_site_cubicweb(self, sitefile):
-        context = {'__file__': sitefile}
-        execfile(sitefile, context, context)
+        from logilab.common.modutils import load_module_from_file
+        module = load_module_from_file(sitefile)
         self.info('%s loaded', sitefile)
         # cube specific options
-        if context.get('options'):
-            self.register_options(context['options'])
+        if getattr(module, 'options', None):
+            self.register_options(module.options)
             self.load_defaults()
 
     def load_configuration(self):
--- a/server/sources/rql2sql.py	Tue Dec 15 17:00:58 2009 +0100
+++ b/server/sources/rql2sql.py	Tue Dec 15 17:01:33 2009 +0100
@@ -995,9 +995,6 @@
             return self.keyword_map[value]()
         if constant.type == 'Boolean':
             value = self.dbms_helper.boolean_value(value)
-        elif constant.type == 'Password' or constant.type == 'Bytes':
-            value = self.dbms_helper.binary_value(value)
-        elif constant.type == 'Substitute':
             _id = constant.value
             if isinstance(_id, unicode):
                 _id = _id.encode()