Skip to content

Commit 2c48f2e

Browse files
authored
Fix get_file when the HTTP response has no Content-Length header (#19833)
1 parent 47bedf1 commit 2c48f2e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

keras/src/utils/file_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,9 +270,9 @@ def __init__(self):
270270
self.finished = False
271271

272272
def __call__(self, block_num, block_size, total_size):
273+
if total_size == -1:
274+
total_size = None
273275
if not self.progbar:
274-
if total_size == -1:
275-
total_size = None
276276
self.progbar = Progbar(total_size)
277277
current = block_num * block_size
278278

0 commit comments

Comments
 (0)