Datastore - Always use utf-8 encoding for error text output storage

This commit is contained in:
dgtlmoon
2025-03-08 19:20:45 +01:00
committed by GitHub
parent 04934b6b3b
commit 0634fe021d

View File

@@ -527,7 +527,7 @@ class model(watch_base):
def save_error_text(self, contents):
self.ensure_data_dir_exists()
target_path = os.path.join(self.watch_data_dir, "last-error.txt")
with open(target_path, 'w') as f:
with open(target_path, 'w', encoding='utf-8') as f:
f.write(contents)
def save_xpath_data(self, data, as_error=False):