diff --git a/ChangeLog.txt b/ChangeLog.txt index 24386231..adcc17e5 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -3,6 +3,7 @@ ### 5.0.2 - 30/03/2024 - Updated: * Updated for coding style + * Updated tomli import for -current version - Bugfixes: * Check for custom upgrade packages (Thanks to Marav) diff --git a/slpkg/blacklist.py b/slpkg/blacklist.py index f3c54a01..a027a2d6 100644 --- a/slpkg/blacklist.py +++ b/slpkg/blacklist.py @@ -1,7 +1,11 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- -import tomli +try: + import tomli +except ModuleNotFoundError: + import tomllib as tomli + from pathlib import Path from slpkg.configs import Configs diff --git a/slpkg/configs.py b/slpkg/configs.py index 1d69386b..a121b069 100644 --- a/slpkg/configs.py +++ b/slpkg/configs.py @@ -1,7 +1,11 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- -import tomli +try: + import tomli +except ModuleNotFoundError: + import tomllib as tomli + import platform from typing import Any from pathlib import Path diff --git a/slpkg/repositories.py b/slpkg/repositories.py index 0135dd29..0f2a2be7 100644 --- a/slpkg/repositories.py +++ b/slpkg/repositories.py @@ -2,7 +2,11 @@ # -*- coding: utf-8 -*- -import tomli +try: + import tomli +except ModuleNotFoundError: + import tomllib as tomli + from pathlib import Path from dataclasses import dataclass