[Lsb-messages] /var/www/bzr/lsb/devel/appbat r1015: fooled again on too-new code, rolling back md5sum generator
Mats Wichmann
mats at linuxfoundation.org
Mon Jan 2 14:51:06 UTC 2017
------------------------------------------------------------
revno: 1015
committer: Mats Wichmann <mats at linuxfoundation.org>
branch nick: appbat
timestamp: Mon 2017-01-02 07:51:06 -0700
message:
fooled again on too-new code, rolling back md5sum generator
modified:
extras/entitycheck.py
-------------- next part --------------
=== modified file 'extras/entitycheck.py'
--- a/extras/entitycheck.py 2017-01-01 15:42:37 +0000
+++ b/extras/entitycheck.py 2017-01-02 14:51:06 +0000
@@ -42,7 +42,6 @@
import time
import traceback
import urllib
-from functools import partial
# Handle hashing module (md5 is the old way, hashlib is the new)
try:
@@ -127,7 +126,10 @@
"""Getter for hash generates on the fly"""
f = open(self.fullpath, "rb")
cksum = self.hashfunc()
- for block in iter(partial(f.read, Entity.BLOCKSIZE), ''):
+ while True:
+ block = f.read(Entity.BLOCKSIZE)
+ if not block:
+ break
cksum.update(block)
f.close()
return cksum.hexdigest()
More information about the lsb-messages
mailing list