aboutsummaryrefslogtreecommitdiffstats
path: root/build/scripts/fetch_from.py
diff options
context:
space:
mode:
authordankolesnikov <dankolesnikov@yandex-team.ru>2022-02-10 16:51:07 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:51:07 +0300
commit98174ab8f0e6dbed8894c8226f62cac4bf36171d (patch)
tree00cab7b3b62da0fe104a2a99c2886064cc0b0d63 /build/scripts/fetch_from.py
parent2e8363373770594fa3e83f1410d513cff82abb30 (diff)
downloadydb-98174ab8f0e6dbed8894c8226f62cac4bf36171d.tar.gz
Restoring authorship annotation for <dankolesnikov@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'build/scripts/fetch_from.py')
-rwxr-xr-xbuild/scripts/fetch_from.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/build/scripts/fetch_from.py b/build/scripts/fetch_from.py
index db4fea50bf..eb36a9d231 100755
--- a/build/scripts/fetch_from.py
+++ b/build/scripts/fetch_from.py
@@ -205,7 +205,7 @@ def size_printer(display_name, size):
return printer
-def fetch_url(url, unpack, resource_file_name, expected_md5=None, expected_sha1=None, tries=10, writers=None):
+def fetch_url(url, unpack, resource_file_name, expected_md5=None, expected_sha1=None, tries=10, writers=None):
logging.info('Downloading from url %s name %s and expected md5 %s', url, resource_file_name, expected_md5)
tmp_file_name = uniq_string_generator()
@@ -217,14 +217,14 @@ def fetch_url(url, unpack, resource_file_name, expected_md5=None, expected_sha1=
real_sha1 = hashlib.sha1()
with open(tmp_file_name, 'wb') as fp:
- copy_stream(
- req.read,
- fp.write,
- real_md5.update,
- real_sha1.update,
- size_printer(resource_file_name, expected_file_size),
- *([] if writers is None else writers)
- )
+ copy_stream(
+ req.read,
+ fp.write,
+ real_md5.update,
+ real_sha1.update,
+ size_printer(resource_file_name, expected_file_size),
+ *([] if writers is None else writers)
+ )
real_md5 = real_md5.hexdigest()
real_file_size = os.path.getsize(tmp_file_name)