Adjust jargon loader to be py3.12-compatible

This commit is contained in:
DarkPhoenix
2024-07-09 21:46:39 +02:00
parent 451b5d4312
commit 8c3b8589d5

View File

@@ -17,7 +17,8 @@
# along with pyfa. If not, see <http://www.gnu.org/licenses/>.
# =============================================================================
import pkg_resources
import importlib.resources
DEFAULT_DATA = importlib.resources.open_text(__name__, 'defaults.yaml').read()
DEFAULT_HEADER = importlib.resources.open_text(__name__, 'header.yaml').read()
DEFAULT_DATA = pkg_resources.resource_string(__name__, 'defaults.yaml').decode()
DEFAULT_HEADER = pkg_resources.resource_string(__name__, 'header.yaml').decode()