From 6c38f31329022e212063c137090fe4f96b733830 Mon Sep 17 00:00:00 2001 From: Jon Cook Date: Mon, 29 Oct 2018 16:52:43 -0700 Subject: [PATCH] Fixed issue where _last_timestamp is not initialized --- potsdb/client.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/potsdb/client.py b/potsdb/client.py index b90199f..8bdde37 100644 --- a/potsdb/client.py +++ b/potsdb/client.py @@ -143,6 +143,8 @@ def log(self, name, val, **tags): return # discard duplicate metrics else: _last_metrics.add(unique_str) + if _last_timestamp == None: + _last_timestamp = timestamp else: _last_timestamp = timestamp _last_metrics.clear()