Update pytest_tests/helpers/file_helper.py
Co-authored-by: Vladimir <108462321+vdomnich-yadro@users.noreply.github.com> Signed-off-by: anikeev-yadro <110966367+anikeev-yadro@users.noreply.github.com>
This commit is contained in:
parent
77ebf95434
commit
abe73fcc96
1 changed files with 1 additions and 1 deletions
|
@ -73,7 +73,7 @@ def get_file_hash(file_path: str, len: Optional[int] = None, offset: Optional[in
|
||||||
"""
|
"""
|
||||||
file_hash = hashlib.sha256()
|
file_hash = hashlib.sha256()
|
||||||
with open(file_path, "rb") as out:
|
with open(file_path, "rb") as out:
|
||||||
if len and offset is None:
|
if len and not offset:
|
||||||
file_hash.update(out.read(len))
|
file_hash.update(out.read(len))
|
||||||
elif len and offset:
|
elif len and offset:
|
||||||
out.seek(offset, 0)
|
out.seek(offset, 0)
|
||||||
|
|
Loading…
Reference in a new issue