Import changes, added method caller
This commit is contained in:
parent
00217b7a8e
commit
03047325b8
|
@ -1,5 +1,5 @@
|
|||
# Python imports
|
||||
import threading, signal, inspect, os, time
|
||||
import threading, subprocess, time
|
||||
|
||||
|
||||
# Gtk imports
|
||||
|
|
|
@ -9,6 +9,11 @@ from gi.repository import GLib
|
|||
|
||||
|
||||
class Controller_Data:
|
||||
def call_method(self, _method_name, data = None):
|
||||
method_name = str(_method_name)
|
||||
method = getattr(self, method_name, lambda data: f"No valid key passed...\nkey={method_name}\nargs={data}")
|
||||
return method(data) if data else method()
|
||||
|
||||
def has_method(self, obj, name):
|
||||
return callable(getattr(obj, name, None))
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ class Settings:
|
|||
self._warning_color = "#ffa800"
|
||||
self._error_color = "#ff0000"
|
||||
|
||||
if not os.path.exists(self._GLADE_FILE):
|
||||
if not os.path.exists(self._CONFIG_PATH):
|
||||
os.mkdir(self._CONFIG_PATH)
|
||||
self._logger = Logger(self._CONFIG_PATH).get_logger()
|
||||
|
||||
|
|
Loading…
Reference in New Issue