From ca4d8f6b9c16b179922ef70d26d7a91cc8fbb539c54e9331e4152436c109c513 Mon Sep 17 00:00:00 2001 From: Daniel Stoppek Date: Fri, 8 Nov 2024 08:38:54 +0100 Subject: [PATCH] change Toml to tomllib --- lib/ConfigLoader.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ConfigLoader.py b/lib/ConfigLoader.py index b7548c6..83867c7 100644 --- a/lib/ConfigLoader.py +++ b/lib/ConfigLoader.py @@ -1,5 +1,5 @@ # This Python file uses the following encoding: utf-8 -import toml +import tomllib from platformdirs import user_config_dir from pathlib import Path from PySide6.QtCore import QObject, Slot @@ -23,7 +23,7 @@ class ConfigLoader(QObject): def setConfig(self, app_config): try: with open (self.config_dir + '/pyqcrm.toml', 'w') as f: - config = Vermasseln().oscarVermasseln(toml.dumps(app_config)) + config = Vermasseln().oscarVermasseln(tomllib.dumps(app_config)) f.write(config) except FileNotFoundError: print("Konnte die Konfiguration nicht speichern.") @@ -33,7 +33,7 @@ class ConfigLoader(QObject): try: with open (self.config_dir + '/pyqcrm.toml', 'r') as f: config = f.read() - self.__config = toml.loads(Vermasseln().entschluesseln(config)) + self.__config = tomllib.loads(Vermasseln().entschluesseln(config)) except FileNotFoundError: print("Konnte die Konfiguration nicht laden.")