mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
Configure: Add debug mode.
This commit is contained in:
1 parent
39f6baf1a9
commit
29986079f3
5 files changed
+51
-20
No files matched your search
+8
-2
@@ -19,8 +19,6 @@ class Config(SQL):
|
||||
self.filename = Config.filename()
|
||||
self.set_default_value()
|
||||
|
||||
print(self.filename)
|
||||
|
||||
super(Config, self).__init__(filename = self.filename)
|
||||
|
||||
def _create(self):
|
||||
@@ -135,6 +133,10 @@ class Config(SQL):
|
||||
v = self.execute("SELECT value FROM data WHERE key='lang'")
|
||||
self.lang = v[0]
|
||||
|
||||
# Debug
|
||||
v = self.execute("SELECT value FROM data WHERE key='debug'")
|
||||
self.debug = v[0] == "True"
|
||||
|
||||
self._load_solver()
|
||||
self._load_stricklers()
|
||||
|
||||
@@ -183,6 +185,7 @@ class Config(SQL):
|
||||
"backup_max": self.backup_max,
|
||||
"editor": self.editor,
|
||||
"lang": self.lang,
|
||||
"debug": self.debug,
|
||||
}
|
||||
|
||||
for key in data:
|
||||
@@ -226,6 +229,9 @@ class Config(SQL):
|
||||
# Stricklers
|
||||
self.stricklers = StricklersList()
|
||||
|
||||
# Debug
|
||||
self.debug = False
|
||||
|
||||
@classmethod
|
||||
def filename(cls):
|
||||
file = ""
|
||||
|
||||
Reference in new issue
Block a user