Skip to content

Commit

Permalink
Pass package path to importlib call, not module path
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkFenX committed Sep 9, 2024
1 parent dd5ab87 commit 87007af
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions service/jargon/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

from importlib.resources import files

DEFAULT_DATA = files(__name__).joinpath('defaults.yaml').open('r', encoding='utf8').read()
DEFAULT_HEADER = files(__name__).joinpath('header.yaml').open('r', encoding='utf8').read()
PACKAGE_NAME = __name__.rsplit(".", maxsplit=1)[0]

DEFAULT_DATA = files(PACKAGE_NAME).joinpath('defaults.yaml').open('r', encoding='utf8').read()
DEFAULT_HEADER = files(PACKAGE_NAME).joinpath('header.yaml').open('r', encoding='utf8').read()

0 comments on commit 87007af

Please sign in to comment.