From d0ce13cebc6d3e882ddeb11ff7618dc917008779 Mon Sep 17 00:00:00 2001 From: 0xDEADCADE <69792955+0xDEADCADE@users.noreply.github.com> Date: Fri, 8 Apr 2022 20:16:21 +0000 Subject: [PATCH] Fix not returning default on nonexistant file --- main.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.py b/main.py index 6644e66..704a895 100644 --- a/main.py +++ b/main.py @@ -35,6 +35,8 @@ def load_data(path, default={}): return json.load(f) except json.decoder.JSONDecodeError: return default + else: + return default # Cache for files sent to the homeserver, prevents reuploading existing files file_cache = load_data(settings["file_cache_path"])