bad copy paste job from one of my old projects whoops

This commit is contained in:
Lynne Megido 2020-08-21 20:51:28 +10:00
parent 7149d9f39d
commit 90b37d6861
Signed by: lynnesbian
GPG Key ID: F0A184B5213D9F90

View File

@ -21,18 +21,3 @@ def msgBox(title, text, form = Gtk.MessageType.WARNING):
def rmatch(pattern, string):
return re.match(pattern, string) != None
def readSettings():
global settings
if not path.isfile(settingsLocation + "config.json"):
os.makedirs(settingsLocation, 0o755)
open(settingsLocation + "config.dat", 'x')
try:
settings = pickle.load(open(settingsLocation + "config.dat", 'rb'))
except:
MsgBox("Error", "Failed to load settings. The default settings will be used instead.")
settings = {"setting":"value", "save database": True} #indent me when releasing!
def writeSettings():
global settings
pickle.dump(settings, open(settingsLocation + "config.dat", 'wb'))