summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <lars.wirzenius@codethink.co.uk>2013-08-14 08:46:01 +0000
committerLars Wirzenius <lars.wirzenius@codethink.co.uk>2013-08-14 16:32:04 +0000
commitbac6fbfa164af018907796b9b1846a6066427daa (patch)
treece2899ba7a9fe6d308000f0078eaea7bafceb31e
parent4bea99229dfa1ee7bffeefc4d194c34eb4752509 (diff)
downloaddefinitions-bac6fbfa164af018907796b9b1846a6066427daa.tar.gz
Load morphologies using the new mechanisms, not the old
-rw-r--r--morphlib/plugins/branch_and_merge_new_plugin.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/morphlib/plugins/branch_and_merge_new_plugin.py b/morphlib/plugins/branch_and_merge_new_plugin.py
index 9594d224..836b9cfe 100644
--- a/morphlib/plugins/branch_and_merge_new_plugin.py
+++ b/morphlib/plugins/branch_and_merge_new_plugin.py
@@ -284,10 +284,10 @@ class SimpleBranchAndMergePlugin(cliapp.Plugin):
@staticmethod
def _checkout_has_systems(gd):
+ loader = morphlib.morphloader.MorphologyLoader()
for filename in glob.iglob(os.path.join(gd.dirname, '*.morph')):
- with open(filename) as mf:
- morphology = morphlib.morph2.Morphology(mf.read())
- if morphology['kind'] == 'system':
- return True
+ m = loader.load_from_file(filename)
+ if m['kind'] == 'system':
+ return True
return False