[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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user