From 3da2aaf488ed5a98980e90ad3034c23e92ab3b25 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Thu, 18 Apr 2013 11:43:15 +0200 Subject: [PATCH] [IMP] only use name of class being created: module is incorrect for dynamically created classes bzr revid: xmo@openerp.com-20130418094315-qk8m13s4zzvojauw --- addons/web/http.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/web/http.py b/addons/web/http.py index 9439d7aa547..52c9bc92e4c 100644 --- a/addons/web/http.py +++ b/addons/web/http.py @@ -367,7 +367,7 @@ class ControllerType(type): path = attrs.get('_cp_path') if Controller in bases: - assert path, "Controller subclass %s missing a _cp_path" % cls + assert path, "Controller subclass %s missing a _cp_path" % name else: parent_paths = set(base._cp_path for base in bases if issubclass(base, Controller)) @@ -385,7 +385,7 @@ class ControllerType(type): if parent_path == path: _logger.warn( "Controller %s extending %s in-place should not " - "explicitly specify URL", cls, parent) + "explicitly specify URL", name, parent) return _logger.warn("Re-exposing %s at %s.\n" "\tThis usage is unsupported.", @@ -395,7 +395,7 @@ class ControllerType(type): if path: assert path not in controllers_class,\ "Trying to expose %s at the same URL as %s" % ( - cls, controllers_class[path]) + name, controllers_class[path]) controllers_class[path] = cls