summaryrefslogtreecommitdiff
path: root/buildtools/wafsamba/samba_utils.py
diff options
context:
space:
mode:
authorThomas Nagy <tnagy1024@gmail.com>2010-03-25 12:18:16 +1100
committerAndrew Tridgell <tridge@samba.org>2010-04-06 20:27:05 +1000
commit81f5efba9182b6907bcb54a3d6ecc4fb19656306 (patch)
tree2636044fb2c1b6837ff8715b88599f5dd6621881 /buildtools/wafsamba/samba_utils.py
parent1588a8d7a9c7aba8f7e34e6bfcaff8f094ff12da (diff)
downloadsamba-81f5efba9182b6907bcb54a3d6ecc4fb19656306.tar.gz
samba-81f5efba9182b6907bcb54a3d6ecc4fb19656306.tar.bz2
samba-81f5efba9182b6907bcb54a3d6ecc4fb19656306.zip
build: replace h_file when replacing md5
Signed-off-by: Andrew Tridgell <tridge@samba.org>
Diffstat (limited to 'buildtools/wafsamba/samba_utils.py')
-rw-r--r--buildtools/wafsamba/samba_utils.py8
1 files changed, 8 insertions, 0 deletions
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()