Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

remove unused and incorrect function hash_file()

  • Loading branch information...
commit 9525d626bbc05cdee2b11fa40b52dba7bf4d0a48 1 parent e84794d
@mdomsch authored committed
Showing with 0 additions and 15 deletions.
  1. +0 −15 S3/Utils.py
View
15 S3/Utils.py
@@ -220,21 +220,6 @@ def mktmpfile(prefix = "/tmp/tmpfile-", randchars = 20):
return mktmpsomething(prefix, randchars, createfunc)
__all__.append("mktmpfile")
-def hash_file(filename):
- """Given filename, return dict with hash types as keys, hashes as values"""
- import hashlib
- md5 = hashlib.md5()
- f = open(filename, "rb")
- while True:
- # Hash 32kB chunks
- data = f.read(32*1024)
- if not data:
- break
- md5.update(data)
- f.close()
- return dict(md5=md5.hexdigest(), sha1=sha1.hexdigest(), sha256=sha256.hexdigest())
-
-
def hash_file_md5(filename):
h = md5()
f = open(filename, "rb")
Please sign in to comment.
Something went wrong with that request. Please try again.