Fix divide by zero issue when timestamp start and end are the same

This commit is contained in:
Rich Somerfield 2013-11-26 14:14:51 -08:00
parent f63380a04e
commit 9a986e0c1b

View File

@ -190,7 +190,7 @@ def format_flow(f, focus, extended=False, hostheader=False, padding=2):
delta = f.response.timestamp_end - f.response.timestamp_start
size = len(f.response.content) + f.response.get_header_size()
rate = utils.pretty_size(size / delta)
rate = utils.pretty_size(size / ( delta if delta > 0 else 1 ) )
d.update(dict(
resp_code = f.response.code,