From 3e787323331e01258ed9619fdbb260ff57ffb824 Mon Sep 17 00:00:00 2001 From: Nathan Woodburn Date: Thu, 21 Nov 2024 16:30:44 +1100 Subject: [PATCH] fix: Check if .git dir exists before trying to read it --- main.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main.py b/main.py index f039e08..18abf79 100644 --- a/main.py +++ b/main.py @@ -1040,6 +1040,9 @@ def settings(): if success == None: success = "" + if not os.path.exists(".git"): + return render_template("settings.html", account=account,sync=account_module.getNodeSync(), + error=error,success=success,version="Error") info = gitinfo.get_git_info() branch = info['refs'] if branch != "main":