Fixed bugs

This commit is contained in:
itdominator 2022-01-24 00:31:27 -06:00
parent cf4411e7ae
commit 7fcdc950fc
8 changed files with 10 additions and 18 deletions

Binary file not shown.

View File

@ -5,8 +5,8 @@ import os, logging
class Logger:
def __init__(self):
pass
def __init__(self, config_path):
self._CONFIG_PATH = config_path
def get_logger(self, loggerName = "NO_LOGGER_NAME_PASSED", createFile = True):
"""
@ -42,8 +42,8 @@ class Logger:
log.addHandler(ch)
if createFile:
folder = "logs"
file = folder + "/application.log"
folder = self._CONFIG_PATH
file = f"{folder}/application.log"
if not os.path.exists(folder):
os.mkdir(folder)

View File

@ -29,7 +29,7 @@ class Settings:
self._XSCREEN_SAVERS = "/usr/lib/xscreensaver/"
self._logger = Logger().get_logger()
self._logger = Logger(self._CONFIG_PATH).get_logger()
self._builder = Gtk.Builder()
self._main_window = None

View File

@ -1,6 +1,2 @@
"""
Utils module
"""
from .Logger import Logger
from .Settings import Settings

View File

@ -5,8 +5,8 @@ import os, logging
class Logger:
def __init__(self):
pass
def __init__(self, config_path):
self._CONFIG_PATH = config_path
def get_logger(self, loggerName = "NO_LOGGER_NAME_PASSED", createFile = True):
"""
@ -42,8 +42,8 @@ class Logger:
log.addHandler(ch)
if createFile:
folder = "logs"
file = folder + "/application.log"
folder = self._CONFIG_PATH
file = f"{folder}/application.log"
if not os.path.exists(folder):
os.mkdir(folder)

View File

@ -29,7 +29,7 @@ class Settings:
self._XSCREEN_SAVERS = "/usr/lib/xscreensaver/"
self._logger = Logger().get_logger()
self._logger = Logger(self._CONFIG_PATH).get_logger()
self._builder = Gtk.Builder()
self._main_window = None

View File

@ -1,6 +1,2 @@
"""
Utils module
"""
from .Logger import Logger
from .Settings import Settings