Utilise built-in tomllib for better compatibility
All checks were successful
Build and Publish Jimmy.2 / build_and_publish (push) Successful in 1m7s

This commit is contained in:
Nexus 2024-05-01 01:23:41 +01:00
parent 4ae95a23ff
commit 090e3f9a74
Signed by: nex
GPG key ID: 0FA334385D0B689F
2 changed files with 4 additions and 3 deletions

View file

@ -4,7 +4,7 @@ yt-dlp @ https://github.com/yt-dlp/yt-dlp/archive/master.tar.gz
py-cord @ git+https://github.com/Pycord-Development/pycord.git py-cord @ git+https://github.com/Pycord-Development/pycord.git
httpx[http2]~=0.26 httpx[http2]~=0.26
psycopg~=3.1 psycopg~=3.1
toml~=0.10 # toml~=0.10
pillow~=10.2 pillow~=10.2
selenium~=4.16 selenium~=4.16
rich~=13.7 rich~=13.7

View file

@ -3,7 +3,7 @@ import os
import subprocess import subprocess
from pathlib import Path from pathlib import Path
import toml import tomllib
log = logging.getLogger("jimmy.autoconf") log = logging.getLogger("jimmy.autoconf")
@ -25,7 +25,8 @@ else:
VERSION = "unknown" VERSION = "unknown"
try: try:
CONFIG = toml.load("config.toml") with open("config.toml", "rb") as file:
CONFIG = tomllib.load(file)
except FileNotFoundError: except FileNotFoundError:
cwd = Path.cwd() cwd = Path.cwd()
log.critical( log.critical(