[Yum-devel] [PATCH] Fix "instant" downloads, BZ 517286

Tim Lauridsen tim.lauridsen at googlemail.com
Fri Aug 14 11:15:41 UTC 2009


On 08/13/2009 08:10 PM, Seth Vidal wrote:
>
>
> On Thu, 13 Aug 2009, James Antill wrote:
>
>> ---
>> output.py | 2 ++
>> 1 files changed, 2 insertions(+), 0 deletions(-)
>>
>> diff --git a/output.py b/output.py
>> index 74a7ce2..60c1dcf 100755
>> --- a/output.py
>> +++ b/output.py
>> @@ -1161,6 +1161,8 @@ to exit.
>> tl = urlgrabber.progress.TerminalLine(8)
>> self.verbose_logger.log(logginglevels.INFO_2, "-" * tl.rest())
>> dl_time = time.time() - download_start_timestamp
>> + if dl_time <= 0: # This stops divide by zero, among other problems
>> + dl_time = 0.01
>> ui_size = tl.add(' | %5sB' % self.format_number(remote_size))
>> ui_time = tl.add(' %9s' % self.format_time(dl_time))
>> ui_end = tl.add(' ' * 5)
>
> ACK - but just so we're clear if the download time is ever LESS than
> zero then there are OTHER PROBLEMS. :)

fly around the earth with the speed of light, wearing a red cape :)

Tim


More information about the Yum-devel mailing list