importpkg: fix suprression of boring content
authorHelmut Grohne <helmut@subdivi.de>
Wed, 29 Dec 2021 14:55:28 +0000 (15:55 +0100)
committerHelmut Grohne <helmut@subdivi.de>
Wed, 29 Dec 2021 14:55:28 +0000 (15:55 +0100)
The content must be bytes. Passing str silently skips the suppression.

importpkg.py

index 6772c4d..7bca70b 100755 (executable)
@@ -19,7 +19,7 @@ from dedup.hashing import DecompressedHash, SuppressingHash, HashedStream, \
 from dedup.compression import GzipDecompressor
 from dedup.image import GIFHash, PNGHash
 
-boring_content = set(("", "\n"))
+boring_content = set((b"", b"\n"))
 
 def sha512_nontrivial():
     return HashBlacklistContent(hashlib.sha512(), boring_content)