This commit is contained in:
Kovid Goyal 2021-09-18 11:51:54 +05:30
parent 76d6820af9
commit 901a075a38
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -5,14 +5,14 @@
import os import os
from typing import Iterator from typing import Iterator
from .rsync import IO_BUFFER_SIZE, begin_signature, iter_job from .rsync import IO_BUFFER_SIZE, begin_create_signature, iter_job
def signature_of_file(path: str) -> Iterator[bytes]: def signature_of_file(path: str) -> Iterator[bytes]:
with open(path, 'rb') as f: with open(path, 'rb') as f:
f.seek(0, os.SEEK_END) f.seek(0, os.SEEK_END)
fsz = f.tell() fsz = f.tell()
job = begin_signature(fsz) job = begin_create_signature(fsz)
f.seek(0) f.seek(0)
finished = False finished = False
while not finished: while not finished: