diff options
Diffstat (limited to 'swiftstory/game_manager.py')
-rw-r--r-- | swiftstory/game_manager.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/swiftstory/game_manager.py b/swiftstory/game_manager.py index 6c2da1f..a69704c 100644 --- a/swiftstory/game_manager.py +++ b/swiftstory/game_manager.py @@ -3,6 +3,8 @@ import logging import os from typing import Dict, List +import pkg_resources + from swiftstory.exception import UnsupportedLanguage from swiftstory.game import Game from swiftstory.cards import Cards @@ -39,7 +41,7 @@ class GameManager: def list_languages(self) -> List[str]: """ List available languages based on FS. """ - return next(os.walk("usr/share/swiftstory/lang"))[1] + return pkg_resources.resource_listdir(__name__, "data/lang") def find_by_name(self, game_name: str, lang: str, create=True) -> Game: """ Find and return the game that matches the name and language |