Skip to content

Commit

Permalink
merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
shubham-kaushal committed Jun 10, 2024
1 parent 24ac7b5 commit c40e078
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 0 additions & 1 deletion outpostkit/repository/lfs/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
FILE_READ_BUFFER_SIZE = 4 * 1024 * 1000 # 4mb, why not



_log = create_lfs_logger(__name__)


Expand Down
5 changes: 3 additions & 2 deletions outpostkit/repository/lfs/transfer.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import base64
import hashlib
from typing import Any, BinaryIO, Callable, Dict, Optional, Union
Expand Down Expand Up @@ -182,7 +181,9 @@ def calculate_digest_header(data: bytes, want_digest: str) -> Dict[str, str]:
# type: (bytes, str) -> Dict[str, str]
"""TODO: Properly implement this"""
if want_digest == "contentMD5":
digest = base64.b64encode(hashlib.md5(data).digest()).decode("ascii") # type: str
digest = base64.b64encode(hashlib.md5(data).digest()).decode(
"ascii"
) # type: str
return {"Content-MD5": digest}
else:
raise RuntimeError(f"Don't know how to handle want_digest value: {want_digest}")

0 comments on commit c40e078

Please sign in to comment.