[FIX] for some reason, my IDE does *not* enjoy getting 3MB of binary data dumped into its log view. Only display the size of the data returned in case of http requests

bzr revid: xmo@openerp.com-20110801123302-tfs1jw3kmlnji0ra
This commit is contained in:
Xavier Morel
2011-08-01 14:33:02 +02:00
parent 4aed9098ca
commit 56ebc5946c
+4 -1
View File
@@ -374,7 +374,10 @@ class HttpRequest(object):
akw = dict([(key, kw[key] if isinstance(kw[key], basestring) else type(kw[key])) for key in kw.keys()])
print "POST --> %s.%s %s %r" % (controller.__class__.__name__, f.__name__, request, akw)
r = f(controller, self, **kw)
print "<--", r
if isinstance(r, str):
print "<--", len(r), 'bytes'
else:
print "<--", len(r), 'characters'
print
return r