From 909b4e328d581e7d8af4671a6aaf24d004235b8c Mon Sep 17 00:00:00 2001 From: kramstrom Date: Fri, 12 Jul 2024 14:50:06 -0400 Subject: [PATCH] lambda --- modal/network_file_system.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modal/network_file_system.py b/modal/network_file_system.py index ddf46c832..4a0e753f1 100644 --- a/modal/network_file_system.py +++ b/modal/network_file_system.py @@ -243,6 +243,8 @@ async def write_file(self, remote_path: str, fp: BinaryIO, progress_cb: Callable If remote_path ends with `/` it's assumed to be a directory and the file will be uploaded with its current name to that directory. """ + progress_cb = progress_cb or (lambda *_, **__: None) + sha_hash = get_sha256_hex(fp) fp.seek(0, os.SEEK_END) data_size = fp.tell()