diff options
author | emkael <emkael@tlen.pl> | 2020-01-02 00:55:55 +0100 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2020-01-02 00:55:55 +0100 |
commit | 8ec9f68131ff3ff6f3dab3af5f27fa25e6d66f45 (patch) | |
tree | 3e15f1bb69f26b4f4dfa4b9dec72176abe6e671c /jfr_playoff/data/info.py | |
parent | 18c8b492ae89319163c4d11d489bf404b6c58e52 (diff) |
Adjustments to the result info client model to make it usable with PyInstallerv2.1.0
Diffstat (limited to 'jfr_playoff/data/info.py')
-rw-r--r-- | jfr_playoff/data/info.py | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/jfr_playoff/data/info.py b/jfr_playoff/data/info.py index 342a878..55cc926 100644 --- a/jfr_playoff/data/info.py +++ b/jfr_playoff/data/info.py @@ -1,7 +1,5 @@ import copy -import glob import inspect -from os.path import dirname, basename, isfile, join from urlparse import urljoin from jfr_playoff.dto import Match, Team @@ -35,14 +33,11 @@ class ResultInfo(object): @property def _client_classes(self): module = __import__(self.submodule_path, fromlist=['']) - for f in glob.glob(join(dirname(module.__file__), "*.py")): - if isfile(f) and not f.endswith('__init__.py'): - submodule_name = basename(f)[:-3] - submodule_path = self.submodule_path + '.' + submodule_name - submodule = __import__(submodule_path, fromlist=['']) - for member in inspect.getmembers(submodule, inspect.isclass): - if member[1].__module__ == submodule_path: - yield member[1] + for submodule_path in module.CLIENTS: + submodule = __import__(submodule_path, fromlist=['']) + for member in inspect.getmembers(submodule, inspect.isclass): + if member[1].__module__ == submodule_path: + yield member[1] def _fill_client_list(self, *args): all_clients = [c(*args) for c in self._client_classes] |