readwrite: dump a more meaningful message on md5 read error

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
This commit is contained in:
Yehuda Sadeh 2014-08-26 14:03:47 -07:00
parent a23c81187b
commit d2c0ccd7b5

View file

@ -50,12 +50,14 @@ def reader(bucket, worker_id, file_names, queue, rand):
end = time.time() end = time.time()
if not fp.valid(): if not fp.valid():
m='md5sum check failed start={s} ({se}) end={e} size={sz} obj={o}'.format(s=time.ctime(start), se=start, e=end, sz=fp.size, o=objname)
result.update( result.update(
error=dict( error=dict(
msg='md5sum check failed', msg=m,
traceback=traceback.format_exc(), traceback=traceback.format_exc(),
), ),
) )
print "ERROR:", m
else: else:
elapsed = end - start elapsed = end - start
result.update( result.update(