We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8da4a00 commit 4d2f8b7Copy full SHA for 4d2f8b7
coverage/data.py
@@ -162,7 +162,12 @@ def combine_parallel_data(
162
163
with open(f, "rb") as fobj:
164
hasher = hashlib.new("sha3_256", usedforsecurity=False)
165
- hasher.update(fobj.read())
+ content = fobj.read()
166
+
167
+ # Ensure content is bytes before hashing
168
+ if isinstance(content, str):
169
+ content = content.encode('utf-8')
170
+ hasher.update(content)
171
sha = hasher.digest()
172
combine_this_one = sha not in file_hashes
173
0 commit comments