From 81f5efba9182b6907bcb54a3d6ecc4fb19656306 Mon Sep 17 00:00:00 2001 From: Thomas Nagy Date: Thu, 25 Mar 2010 12:18:16 +1100 Subject: build: replace h_file when replacing md5 Signed-off-by: Andrew Tridgell --- buildtools/wafsamba/samba_utils.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'buildtools/wafsamba') diff --git a/buildtools/wafsamba/samba_utils.py b/buildtools/wafsamba/samba_utils.py index b1e62f1fce..1c597f4e07 100644 --- a/buildtools/wafsamba/samba_utils.py +++ b/buildtools/wafsamba/samba_utils.py @@ -362,3 +362,11 @@ except: def hexdigest(self): return self.digest().encode('hex') Utils.md5 = replace_md5 + def h_file(filename): + f = open(filename, 'rb') + m = replace_md5() + while (filename): + filename = f.read(100000) + m.update(filename) + f.close() + return m.digest() -- cgit