tidy up hashing algo method
@@ -650,9 +650,6 @@ class StorageDriver(BaseDriver):
return (hasher.hexdigest(), total_len)
if not hasattr(stream, '__exit__'):
for s in stream:
- if isinstance(s, str):
- hasher.update(s)
- else:
hasher.update(s)
total_len = total_len + len(s)
return (hasher.hexdigest(), total_len)
@@ -660,9 +657,6 @@ class StorageDriver(BaseDriver):
buf = stream.read(blocksize)
while len(buf) > 0:
total_len = total_len + len(buf)
- if isinstance(buf, str):
- hasher.update(buf)
- else:
hasher.update(buf)
buf = stream.read(blocksize)
return (hasher.hexdigest(), total_len)
