Check for none

merge-requests/30/head
Bob Mottram 2023-07-14 11:05:33 +01:00
parent c527696202
commit 95bddbe332
1 changed files with 1 additions and 1 deletions

View File

@ -1513,7 +1513,7 @@ def person_unsnooze(base_dir: str, nickname: str, domain: str,
content = None content = None
with open(snoozed_filename, 'r', encoding='utf-8') as snoozed_file: with open(snoozed_filename, 'r', encoding='utf-8') as snoozed_file:
content = snoozed_file.read().replace(replace_str, '') content = snoozed_file.read().replace(replace_str, '')
if content: if content is not None:
try: try:
with open(snoozed_filename, 'w+', with open(snoozed_filename, 'w+',
encoding='utf-8') as snoozfile: encoding='utf-8') as snoozfile: