fix: Check if .git dir exists before trying to read it
This commit is contained in:
parent
0be6b8b435
commit
3e78732333
3
main.py
3
main.py
@ -1040,6 +1040,9 @@ def settings():
|
|||||||
if success == None:
|
if success == None:
|
||||||
success = ""
|
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()
|
info = gitinfo.get_git_info()
|
||||||
branch = info['refs']
|
branch = info['refs']
|
||||||
if branch != "main":
|
if branch != "main":
|
||||||
|
Loading…
Reference in New Issue
Block a user