diff options
Diffstat (limited to 'modules/util.py')
-rw-r--r-- | modules/util.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/util.py b/modules/util.py index c2a27590..ee373e92 100644 --- a/modules/util.py +++ b/modules/util.py @@ -21,11 +21,11 @@ def html_path(filename): def html(filename):
path = html_path(filename)
- if os.path.exists(path):
+ try:
with open(path, encoding="utf8") as file:
return file.read()
-
- return ""
+ except OSError:
+ return ""
def walk_files(path, allowed_extensions=None):
|