summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--morphlib/morphset.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/morphlib/morphset.py b/morphlib/morphset.py
index ccfdaa5..34d6181 100644
--- a/morphlib/morphset.py
+++ b/morphlib/morphset.py
@@ -128,7 +128,7 @@ class MorphologySet(object):
for spec in specs:
if cb_filter(m, kind, spec):
fn = morphlib.util.sanitise_morphology_path(
- spec.get('morph', spec.get('name')))
+ spec['morph'] if 'morph' in spec else spec['name'])
orig_spec = (spec.get('repo'), spec.get('ref'), fn)
dirtied = cb_process(m, kind, spec)
if dirtied:
@@ -150,7 +150,7 @@ class MorphologySet(object):
m.ref = spec.get('ref')
m.dirty = True
file = morphlib.util.sanitise_morphology_path(
- spec.get('morph', spec.get('name')))
+ spec['morph'] if 'morph' in spec else spec['name'])
assert (m.filename == file
or m.repo_url == spec.get('repo')), \
'Moving morphologies is not supported.'
@@ -164,7 +164,7 @@ class MorphologySet(object):
'''
def wanted_spec(m, kind, spec):
- spec_name = spec.get('name', spec.get('morph'))
+ spec_name = spec['name'] if 'name' in spec else spec['morph']
return (spec.get('repo') == repo_url and
spec.get('ref') == orig_ref and
spec_name == morph_name)