From 6b26be0d4150e26037084ba1f634acc62059e577 Mon Sep 17 00:00:00 2001 From: Faiyaz Ahmed Date: Thu, 21 Aug 2008 16:43:10 +0000 Subject: [PATCH] bwmon: Fixed extra notification when 1 of 2 limits weren't exceeded. --- bwmon.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bwmon.py b/bwmon.py index 10cdd95..19e28b4 100644 --- a/bwmon.py +++ b/bwmon.py @@ -314,7 +314,7 @@ class Slice: 'date': time.asctime(time.gmtime()) + " GMT", 'period': format_period(period)} - if new_maxrate != self.MaxRate: + if new_maxrate != (self.MaxRate * 1000): # Format template parameters for low bandwidth message params['class'] = "low bandwidth" params['bytes'] = format_bytes(usedbytes - self.bytes) @@ -325,7 +325,7 @@ class Slice: message += template % params logger.log("bwmon: ** %(slice)s %(class)s capped at %(new_maxrate)s/s " % params) - if new_maxexemptrate != self.Maxi2Rate: + if new_maxexemptrate != (self.Maxi2Rate * 1000): # Format template parameters for high bandwidth message params['class'] = "high bandwidth" params['bytes'] = format_bytes(usedi2bytes - self.i2bytes) -- 2.43.0