def __call__(self, *args):
"""Configuring calls.
"""
try:
call_info = str(gc.get_referents(self))
subst1 = "ServerProxy for "
subst2 = ">>"
proxy = call_info[call_info.find(subst1) + len(subst1):call_info.find(subst2)]
if len(args) == 0:
meth = "%s()" % self.__name
elif len(args) == 1:
if args[0] == "":
meth = "%s('')" % self.__name
else:
meth = "%s(%s)" % (self.__name, ",".join(map(str, args)))
else:
meth = "%s%s" % (self.__name, args)
if "__repr__" not in meth:
self.class_logger.debug("%s.%s" % (proxy, meth))
except Exception:
pass
return self.__send(self.__name, args)
评论列表
文章目录