Commits

James O'Beirne committed bbe526e

Only conditionally log stats data (to empty list errors)

  • Participants
  • Parent commits 65f2522

Comments (0)

Files changed (1)

ddbmock/utils/stat.py

         points = self.current_point_list
 
         interval = (self.current_point_time - self.last_aggregation_time) / 60.0
-        self.log.info("%s: interval=%s min=%s max=%s average=%s",
-                       self.name,
-                       round(interval),
-                       min(points),
-                       max(points),
-                       average(points))
+
+        if points:
+            self.log.info("%s: interval=%s min=%s max=%s average=%s",
+                        self.name,
+                        round(interval),
+                        min(points),
+                        max(points),
+                        average(points))
 
         #reset
         self.current_point_list = []