mirror of
https://github.com/vale981/ray
synced 2025-03-08 19:41:38 -05:00
[runtime_env] Continue hashing if data is none (#14906)
This commit is contained in:
parent
0d1b30620b
commit
9b85b0b82b
1 changed files with 3 additions and 3 deletions
|
@ -139,9 +139,9 @@ def _hash_modules(path: Path) -> bytes:
|
|||
if not Path(from_file_name).is_dir():
|
||||
with open(from_file_name, mode="rb") as f:
|
||||
data = f.read(BUF_SIZE)
|
||||
if not data:
|
||||
break
|
||||
md5.update(data)
|
||||
while len(data) != 0:
|
||||
md5.update(data)
|
||||
data = f.read(BUF_SIZE)
|
||||
hash_val = _xor_bytes(hash_val, md5.digest())
|
||||
return hash_val
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue