fix debug attribute conflict on configuration stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Mon, 12 Oct 2009 13:12:52 +0200
branchstable
changeset 3641 cf30e4498674
parent 3640 baa21e8d22c1
child 3642 8bc800f8b173
fix debug attribute conflict on configuration
cwconfig.py
cwvreg.py
etwist/server.py
vregistry.py
web/webconfig.py
--- a/cwconfig.py	Mon Oct 12 12:57:48 2009 +0200
+++ b/cwconfig.py	Mon Oct 12 13:12:52 2009 +0200
@@ -212,7 +212,7 @@
     # nor remove appobjects based on unused interface
     cleanup_interface_sobjects = True
     # debug mode
-    debug = False
+    debugmode = False
 
     if os.environ.get('APYCOT_ROOT'):
         mode = 'test'
@@ -565,7 +565,7 @@
                 logthreshold = 'DEBUG'
             else:
                 logthreshold = self['log-threshold']
-        self.debug = debug
+        self.debugmode = debug
         init_log(debug, syslog, logthreshold, logfile, self.log_format)
         # configure simpleTal logger
         logging.getLogger('simpleTAL').setLevel(logging.ERROR)
--- a/cwvreg.py	Mon Oct 12 12:57:48 2009 +0200
+++ b/cwvreg.py	Mon Oct 12 13:12:52 2009 +0200
@@ -337,7 +337,7 @@
     def register_objects(self, path, force_reload=None):
         """overriden to remove objects requiring a missing interface"""
         if force_reload is None:
-            force_reload = self.config.debug
+            force_reload = self.config.debugmode
         try:
             self._register_objects(path, force_reload)
         except RegistryOutOfDate:
--- a/etwist/server.py	Mon Oct 12 12:57:48 2009 +0200
+++ b/etwist/server.py	Mon Oct 12 13:12:52 2009 +0200
@@ -181,7 +181,7 @@
     def render(self, request):
         """Render a page from the root resource"""
         # reload modified files in debug mode
-        if self.config.debug:
+        if self.debugmode:
             self.appli.vreg.register_objects(self.config.vregistry_path())
         if self.config['profile']: # default profiler don't trace threads
             return self.render_request(request)
--- a/vregistry.py	Mon Oct 12 12:57:48 2009 +0200
+++ b/vregistry.py	Mon Oct 12 13:12:52 2009 +0200
@@ -185,7 +185,7 @@
                                      % (args, kwargs.keys(),
                                         [repr(v) for v in appobjects]))
         if len(winners) > 1:
-            if self.config.debug:
+            if self.config.debugmode:
                 self.error('select ambiguity, args: %s\nkwargs: %s %s',
                            args, kwargs.keys(), [repr(v) for v in winners])
             else:
--- a/web/webconfig.py	Mon Oct 12 12:57:48 2009 +0200
+++ b/web/webconfig.py	Mon Oct 12 13:12:52 2009 +0200
@@ -12,7 +12,7 @@
 from os.path import join, exists, split
 
 from logilab.common.configuration import Method
-from logilab.common.decorators import cached
+from logilab.common.de corators import cached
 
 from cubicweb.toolsutils import read_config
 from cubicweb.cwconfig import CubicWebConfiguration, register_persistent_options, merge_options