Commit 7601acd7 authored by Sofia Papagiannaki's avatar Sofia Papagiannaki
Browse files

pithos: Fix backend logging.

* Log unicode arguments
* Do not log get_block return value (too long)
parent 6b9ca4dc
......@@ -133,7 +133,7 @@ def debug_method(func):
result = format_exc()
all_args = [str(i) for i in args]
all_args = map(repr, args)
map(all_args.append, ('%s=%s' % (k, v) for k, v in kw.iteritems()))
logger.debug(">>> %s(%s) <<< %s" % (
func.__name__, ', '.join(all_args).rstrip(', '), result))
......@@ -1261,10 +1261,10 @@ class ModularBackend(BaseBackend):
self._can_read(user, account, container, name)
return (account, container, name)
def get_block(self, hash):
"""Return a block's data."""
logger.debug("get_block: %s", hash)
block =
if not block:
raise ItemNotExists('Block does not exist')
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment