databaseconnection
This commit is contained in:
@@ -6,6 +6,7 @@ from PySide6.QtCore import QObject, Slot
|
||||
from .Vermasseln import Vermasseln
|
||||
import shutil
|
||||
from urllib.parse import urlparse
|
||||
import os
|
||||
|
||||
class ConfigLoader(QObject):
|
||||
__config = None
|
||||
@@ -22,12 +23,13 @@ class ConfigLoader(QObject):
|
||||
|
||||
@Slot(str, str)
|
||||
def importConfig(self, confile, password):
|
||||
print(password)
|
||||
|
||||
confile = urlparse(confile)
|
||||
print(confile.path)
|
||||
#confile= confile.replace('file://','')
|
||||
shutil.copyfile(confile.path, self.config_dir+ '/pyqcrm.toml')
|
||||
confile = confile.path
|
||||
|
||||
if os.name == "nt":
|
||||
confile = confile[1:]
|
||||
shutil.copyfile(confile, self.config_dir+ '/pyqcrm.toml')
|
||||
|
||||
@Slot(dict)
|
||||
def setConfig(self, app_config):
|
||||
@@ -50,7 +52,7 @@ class ConfigLoader(QObject):
|
||||
|
||||
|
||||
def getConfig(self):
|
||||
|
||||
print(self.__config['database'])
|
||||
return self.__config
|
||||
|
||||
def createConfig(self):
|
||||
|
||||
Reference in New Issue
Block a user