s/TORRENT/BITTORRENT
This commit is contained in:
parent
d00db518df
commit
e54b86c6eb
7 changed files with 14 additions and 14 deletions
|
@ -231,7 +231,7 @@ def _upload_chunk(namespace, repo_name, upload_uuid):
|
|||
initial_sha1_value = found.piece_sha_state or resumablehashlib.sha1()
|
||||
initial_sha1_pieces_value = found.piece_hashes or ''
|
||||
|
||||
piece_hasher = PieceHasher(app.config['TORRENT_PIECE_SIZE'], start_offset,
|
||||
piece_hasher = PieceHasher(app.config['BITTORRENT_PIECE_SIZE'], start_offset,
|
||||
initial_sha1_pieces_value,
|
||||
initial_sha1_value)
|
||||
|
||||
|
@ -304,7 +304,7 @@ def _finish_upload(namespace, repo_name, upload_obj, expected_digest):
|
|||
|
||||
if upload_obj.piece_sha_state is not None and not already_exists:
|
||||
piece_bytes = upload_obj.piece_hashes + upload_obj.piece_sha_state.digest()
|
||||
model.storage.save_torrent_info(blob_storage, app.config['TORRENT_PIECE_SIZE'], piece_bytes)
|
||||
model.storage.save_torrent_info(blob_storage, app.config['BITTORRENT_PIECE_SIZE'], piece_bytes)
|
||||
|
||||
# Delete the upload tracking row.
|
||||
upload_obj.delete_instance()
|
||||
|
|
Reference in a new issue