Skip to content

Commit 5675607

Browse files
committed
drop! Emulate corrupted mirror download
1 parent 6a90fbc commit 5675607

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/azul/indexer/mirror_service.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,9 @@ def _download(self,
240240
if response.status == expected_status:
241241
log.info('Downloaded %d bytes of file %r in %.3fs',
242242
size, file.uuid, time.time() - start)
243-
return response.data
243+
data = bytearray(response.data)
244+
data[-1] = 42
245+
return data
244246
else:
245247
raise RuntimeError('Unexpected response from repository', response.status)
246248

0 commit comments

Comments
 (0)