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

pull/2893/merge
dgtlmoon 2025-03-08 19:20:45 +01:00 zatwierdzone przez GitHub
rodzic 04934b6b3b
commit 0634fe021d
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -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):