diff --git a/blocking.py b/blocking.py index 128724f40..118918e28 100644 --- a/blocking.py +++ b/blocking.py @@ -1647,8 +1647,8 @@ def set_broch_mode(base_dir: str, domain_full: str, enabled: bool) -> None: if handle_domain not in allowed_domains: allowed_domains.append(handle_domain) except OSError as ex: - print('EX: failed to read ' + following_filename + - ' ' + str(ex)) + print('EX: set_broch_mode failed to read ' + + following_filename + ' ' + str(ex)) break # write the allow file diff --git a/blog.py b/blog.py index 201346a15..a368940a9 100644 --- a/blog.py +++ b/blog.py @@ -803,8 +803,9 @@ def html_edit_blog(media_instance: bool, translate: {}, dir_str = data_dir(base_dir) if os.path.isfile(dir_str + '/newpost.txt'): try: - with open(dir_str + '/newpost.txt', 'r', encoding='utf-8') as file: - edit_blog_text = '

' + file.read() + '

' + with open(dir_str + '/newpost.txt', 'r', + encoding='utf-8') as fp_blog: + edit_blog_text = '

' + fp_blog.read() + '

' except OSError: print('EX: html_edit_blog unable to read ' + dir_str + '/newpost.txt')