def setProgress(self, data):
"""Set the progress of the bar."""
# TODO: What is the data structure in case of a patch?
module_logger.info("Progress {}".format(data))
try:
text = _(
'Downloading required files...: Total file size {}, Time remaining {}.')
text = text.format(humanize.naturalsize(
data['total']), data['time'])
self.setLabelText(text)
self.setValue(int(float(data['percent_complete']) * 5))
except Exception as e:
module_logger.exception("message")
评论列表
文章目录