🐛 restore alternative import

This commit is contained in:
Félix Voituret
2021-01-08 19:10:01 +01:00
parent 306bc28d9e
commit 07a7980493

View File

@@ -3,11 +3,17 @@
""" Module that provides configuration loading function. """ """ Module that provides configuration loading function. """
import importlib.resources as loader
import json import json
from os.path import exists from os.path import exists
from typing import Dict from typing import Dict
try:
import importlib.resources as loader
except ImportError:
# Try backported to PY<37 `importlib_resources`.
# pyright: reportMissingImports=false
import importlib_resources as loader
from .. import SpleeterError, resources from .. import SpleeterError, resources
__email__ = "spleeter@deezer.com" __email__ = "spleeter@deezer.com"