break the pskreporter loop if there's nothing to upload

This commit is contained in:
Jakob Ketterl 2020-12-09 22:59:45 +01:00
parent 8f9f9e8397
commit eef61f9d1e

View File

@ -86,6 +86,7 @@ class PskReporter(object):
def upload(self): def upload(self):
try: try:
with self.spotLock: with self.spotLock:
self.timer = None
spots = self.spots spots = self.spots
self.spots = [] self.spots = []
@ -94,9 +95,6 @@ class PskReporter(object):
except Exception: except Exception:
logger.exception("Failed to upload spots") logger.exception("Failed to upload spots")
self.timer = None
self.scheduleNextUpload()
def cancelTimer(self): def cancelTimer(self):
if self.timer: if self.timer:
self.timer.cancel() self.timer.cancel()