summaryrefslogtreecommitdiff
path: root/morphlib/plugins
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2012-09-19 16:09:04 +0100
committerSam Thursfield <sam.thursfield@codethink.co.uk>2012-09-21 16:02:17 +0100
commit12f27c2ecf231c9659797f116a3217474742f609 (patch)
treef2d3f726f98330e5c030a66d7a129abd8e5edd95 /morphlib/plugins
parentdf5a286be1df12261b36a05227bbed5d8a3ee68f (diff)
downloadmorph-12f27c2ecf231c9659797f116a3217474742f609.tar.gz
Warn when we edit morphologies where filename != name
Diffstat (limited to 'morphlib/plugins')
-rw-r--r--morphlib/plugins/branch_and_merge_plugin.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/morphlib/plugins/branch_and_merge_plugin.py b/morphlib/plugins/branch_and_merge_plugin.py
index 00813350..c7bcedfb 100644
--- a/morphlib/plugins/branch_and_merge_plugin.py
+++ b/morphlib/plugins/branch_and_merge_plugin.py
@@ -243,6 +243,10 @@ class BranchAndMergePlugin(cliapp.Plugin):
with morphlib.savefile.SaveFile(filename, 'w') as f:
morphology.write_to_file(f)
+ if name != morphology['name']:
+ logging.warning('%s: morphology "name" should match filename' %
+ filename)
+
@staticmethod
def get_edit_info(morphology_name, morphology, name, collection='strata'):
try: