X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=apt_p2p%2Fdb.py;h=63cc7e72cbc8f783030afe593c8464b708433f14;hb=ce20dde0bf4440dbb651bae51f85750aa8afdb8e;hp=396f419da12b791d5f2ce0408ce6ce2e79a700e0;hpb=7b1167d8ce780312d3689c9309c7e9c64060c085;p=quix0rs-apt-p2p.git diff --git a/apt_p2p/db.py b/apt_p2p/db.py index 396f419..63cc7e7 100644 --- a/apt_p2p/db.py +++ b/apt_p2p/db.py @@ -114,8 +114,7 @@ class DB: # Hash the pieces to get the piecehash piecehash = '' if pieces: - s = sha.new().update(pieces) - piecehash = sha.digest() + piecehash = sha.new(pieces).digest() # Check the database for the hash c = self.conn.cursor()