From b7ca10ebac45cb21b54bd06b62c83d26d78cc4bd Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Sat, 15 Jan 2022 23:18:04 +0100 Subject: [PATCH] Scrub watch snapshot fixes --- changedetectionio/store.py | 10 +++++----- changedetectionio/update_worker.py | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/changedetectionio/store.py b/changedetectionio/store.py index 28e6a460..187fde83 100644 --- a/changedetectionio/store.py +++ b/changedetectionio/store.py @@ -301,10 +301,10 @@ class ChangeDetectionStore: del_timestamps.append(timestamp) changes_removed += 1 - if not limit_timestamp: - self.data['watching'][uuid]['last_checked'] = 0 - self.data['watching'][uuid]['last_changed'] = 0 - self.data['watching'][uuid]['previous_md5'] = 0 + if not limit_timestamp: + self.data['watching'][uuid]['last_checked'] = 0 + self.data['watching'][uuid]['last_changed'] = 0 + self.data['watching'][uuid]['previous_md5'] = "" for timestamp in del_timestamps: @@ -323,7 +323,7 @@ class ChangeDetectionStore: content = fp.read() self.data['watching'][uuid]['previous_md5'] = hashlib.md5(content).hexdigest() except (FileNotFoundError, IOError): - self.data['watching'][uuid]['previous_md5'] = False + self.data['watching'][uuid]['previous_md5'] = "" pass self.needs_write = True diff --git a/changedetectionio/update_worker.py b/changedetectionio/update_worker.py index 8f535829..33ab0446 100644 --- a/changedetectionio/update_worker.py +++ b/changedetectionio/update_worker.py @@ -60,7 +60,7 @@ class update_worker(threading.Thread): self.datastore.update_watch(uuid=uuid, update_obj={'last_error': err_text, 'last_check_status': e.status_code}) except Exception as e: - self.app.logger.error("Exception reached processing watch UUID:%s - %s", uuid, str(e)) + self.app.logger.error("Exception reached processing watch UUID: %s - %s", uuid, str(e)) self.datastore.update_watch(uuid=uuid, update_obj={'last_error': str(e)}) else: