From 109174b1ba39c8c76aaee240b86d5b399fabb2a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laura=20Kl=C3=BCnder?= Date: Fri, 16 Jun 2017 12:07:18 +0200 Subject: [PATCH] better exception message --- src/c3nav/editor/wrappers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/c3nav/editor/wrappers.py b/src/c3nav/editor/wrappers.py index 00401e33..58d2c097 100644 --- a/src/c3nav/editor/wrappers.py +++ b/src/c3nav/editor/wrappers.py @@ -52,7 +52,7 @@ class BaseWrapper: pass elif callable(value) and name not in self._allowed_callables: if not isinstance(self, ModelInstanceWrapper) or hasattr(models.Model, name): - raise TypeError('Can not call %s.%s wrapped!' % (self._obj, name)) + raise TypeError('Can not call %s.%s wrapped!' % (type(self), name)) return value def __setattr__(self, name, value):