Commit 82352c7e authored by Andrii Salnikov's avatar Andrii Salnikov

raising download progress reporting to the info level

parent aee4a35d
...@@ -290,13 +290,13 @@ class CommunityRTEControl(ComponentControl): ...@@ -290,13 +290,13 @@ class CommunityRTEControl(ComponentControl):
while True: while True:
chunk = url_data.read(chunk_size) chunk = url_data.read(chunk_size)
if not chunk: if not chunk:
self.logger.debug('Downloaded 100%') self.logger.info('Downloaded 100%')
break break
downloaded += chunk_size downloaded += chunk_size
if data_len > 0: if data_len > 0:
ratio = (downloaded * 100.0)/data_len ratio = (downloaded * 100.0)/data_len
if ratio - reported_ratio > 10: if ratio - reported_ratio > 10:
self.logger.debug('Downloaded %.2f%%', ratio) self.logger.info('Downloaded %.2f%%', ratio)
reported_ratio = ratio reported_ratio = ratio
dest_f.write(chunk) dest_f.write(chunk)
except URLError as e: except URLError as e:
...@@ -889,7 +889,7 @@ class CommunityRTEControl(ComponentControl): ...@@ -889,7 +889,7 @@ class CommunityRTEControl(ComponentControl):
ditem['checksum_type'] = dinfo[9:].split(':', 2)[0] ditem['checksum_type'] = dinfo[9:].split(':', 2)[0]
ditem['checksum_value'] = dinfo[9:].split(':', 2)[1].strip() ditem['checksum_value'] = dinfo[9:].split(':', 2)[1].strip()
elif dinfo.startswith('filename:'): elif dinfo.startswith('filename:'):
ditem['filename'] = dinfo[9:] ditem['filename'] = dinfo[9:].strip()
if 'url' not in ditem: if 'url' not in ditem:
self.logger.error('Failed to find URL in the download line: %s. Skipping!', line) self.logger.error('Failed to find URL in the download line: %s. Skipping!', line)
continue continue
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment