summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2014-07-11 14:25:40 +0100
committerRichard Maw <richard.maw@codethink.co.uk>2014-07-11 14:25:40 +0100
commitce1fedb4e5ab82105853c4f3a8e05fb83f62c18e (patch)
tree6a738f64b517992eed10c3d5891bbb27840202e4 /scripts
parentfe4486c1ec69c520a2c0aee7b52c35b57808120e (diff)
parent597f2a19363b7e91b928d814627c9236779998fb (diff)
downloadmorph-ce1fedb4e5ab82105853c4f3a8e05fb83f62c18e.tar.gz
Merge remote-tracking branch 'origin/baserock/richardmaw/S11284/morphologies-by-path-v4'
Reviewed-by: Sam Thursfield Reviewed-by: Lars Wirzenius
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/edit-morph6
1 files changed, 1 insertions, 5 deletions
diff --git a/scripts/edit-morph b/scripts/edit-morph
index 2b81747c..d0b793a4 100755
--- a/scripts/edit-morph
+++ b/scripts/edit-morph
@@ -283,13 +283,9 @@ class EditMorph(cliapp.Application):
return system
def cmd_cluster_init(self, (cluster_file,)):
- suffix = '.morph'
- if not cluster_file.endswith(suffix):
- raise cliapp.AppException(
- "Morphology file path must end with .morph")
with open(cluster_file, 'w') as f:
d = {
- 'name': os.path.basename(cluster_file)[:-len(suffix)],
+ 'name': os.path.splitext(os.path.basename(cluster_file))[0],
'kind': 'cluster',
}
yaml.dump(d, f)