Print obj.attr first
This commit is contained in:
parent
20b5a534c5
commit
ef9e45a544
1 changed files with 6 additions and 5 deletions
|
|
@ -102,8 +102,13 @@ def debug(*args):
|
||||||
def wraper(function):
|
def wraper(function):
|
||||||
def print_debug(self, value):
|
def print_debug(self, value):
|
||||||
logger = getLogger('b2filters')
|
logger = getLogger('b2filters')
|
||||||
|
result = ''
|
||||||
|
if self._obj is not None:
|
||||||
|
result += "%s" % self._obj
|
||||||
|
if self._key is not None:
|
||||||
|
result += ".%s" % self._key
|
||||||
name = str(self)
|
name = str(self)
|
||||||
result = "%s(%r" % (name, value)
|
result += " %s(%r" % (name, value)
|
||||||
for arg in self.__dict__:
|
for arg in self.__dict__:
|
||||||
if arg.startswith('_') or arg == u"selector":
|
if arg.startswith('_') or arg == u"selector":
|
||||||
continue
|
continue
|
||||||
|
|
@ -111,10 +116,6 @@ def debug(*args):
|
||||||
continue
|
continue
|
||||||
result += ", %s=%r" % (arg, getattr(self, arg))
|
result += ", %s=%r" % (arg, getattr(self, arg))
|
||||||
result += u')'
|
result += u')'
|
||||||
if self._obj is not None:
|
|
||||||
result += " %s" % self._obj
|
|
||||||
if self._key is not None:
|
|
||||||
result += ".%s" % self._key
|
|
||||||
logger.debug(result)
|
logger.debug(result)
|
||||||
res = function(self, value)
|
res = function(self, value)
|
||||||
return res
|
return res
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue