# HG changeset patch # User Sylvain Thénault # Date 1255345972 -7200 # Node ID cf30e4498674ad673aaf4b154c8c8d04b34c625b # Parent baa21e8d22c1f0c43e440ea85a9b0f38a4af72ed fix debug attribute conflict on configuration diff -r baa21e8d22c1 -r cf30e4498674 cwconfig.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) diff -r baa21e8d22c1 -r cf30e4498674 cwvreg.py --- 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: diff -r baa21e8d22c1 -r cf30e4498674 etwist/server.py --- 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) diff -r baa21e8d22c1 -r cf30e4498674 vregistry.py --- 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: diff -r baa21e8d22c1 -r cf30e4498674 web/webconfig.py --- 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