From 40d4a019bb5846cf8abf18bfad3c30656464bc9b Mon Sep 17 00:00:00 2001 From: Victorious Children Studios Date: Thu, 14 Dec 2023 13:41:06 +0200 Subject: [PATCH] Making sure that settings/settings.data is not in the git. --- .gitignore | 1 + settings/settings.data | 1 - settings/settings.py | 11 ++++++++--- 3 files changed, 9 insertions(+), 4 deletions(-) delete mode 100644 settings/settings.data diff --git a/.gitignore b/.gitignore index 163f194..ec5a428 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ settings/settings.data +*.data project_manager/projects_list.data *~ \ No newline at end of file diff --git a/settings/settings.data b/settings/settings.data deleted file mode 100644 index 1636688..0000000 --- a/settings/settings.data +++ /dev/null @@ -1 +0,0 @@ -Language = Unknown \ No newline at end of file diff --git a/settings/settings.py b/settings/settings.py index 869434d..8c1d0bd 100644 --- a/settings/settings.py +++ b/settings/settings.py @@ -3,11 +3,16 @@ import os + def read(setting): #opening the file - data = open("settings/settings.data") - data = data.read() - data = data.split("\n") + try: + data = open("settings/settings.data") + data = data.read() + data = data.split("\n") + except: + data = ["Language = Unknown"] + #finding the keyword for line in data: if line.startswith(setting):