diff options
author | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2015-07-30 18:47:43 +0100 |
---|---|---|
committer | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2015-09-28 16:51:51 +0000 |
commit | c521d6fa5a8a18ce3ed420d475ef0a3cc7b51ee5 (patch) | |
tree | 26a905f38d625b35f3da798fff8ee7073b3dae3e /morphlib/plugins/get_repo_plugin.py | |
parent | 54496d7d9b6d5e1c64c5c220ab2f280e0b9e84ec (diff) | |
download | morph-c521d6fa5a8a18ce3ed420d475ef0a3cc7b51ee5.tar.gz |
Change how MorphologyLoader instances are created
Loading .morph files is becoming a bit more complicated, as we need to
deal with the VERSION file, and possibly soon with a DEFAULTS file as
well.
The logic of loading and parsing .morph files is done either in the
sourceresolver module, or the morphloader module. This change means that
all users of the latter module can use the get hold of a
MorphologyLoader instance with VERSION already parsed. If DEFAULTS is
added then it is also simple to parse DEFAULTS.
Change-Id: Ib33756e9dbd078e38f12dd7f776c89584b178959
Diffstat (limited to 'morphlib/plugins/get_repo_plugin.py')
-rw-r--r-- | morphlib/plugins/get_repo_plugin.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/morphlib/plugins/get_repo_plugin.py b/morphlib/plugins/get_repo_plugin.py index 38039406..9c1c19f1 100644 --- a/morphlib/plugins/get_repo_plugin.py +++ b/morphlib/plugins/get_repo_plugin.py @@ -122,10 +122,9 @@ class GetRepoPlugin(cliapp.Plugin): definitions_repo = morphlib.definitions_repo.open( '.', search_for_root=True, search_workspace=True, app=self.app) - loader = morphlib.morphloader.MorphologyLoader() self.app.status(msg='Loading in all morphologies') - for morph in definitions_repo.load_all_morphologies(loader): + for morph in definitions_repo.load_all_morphologies(): if morph['kind'] == 'stratum': for chunk in morph['chunks']: if chunk['name'] == chunk_name: |