summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Coldrick <adam.coldrick@codethink.co.uk>2014-08-13 12:56:20 (GMT)
committerAdam Coldrick <adam.coldrick@codethink.co.uk>2014-08-13 12:56:20 (GMT)
commit709182b67f064eeca74ac9e79c1d91af1e7c86a9 (patch)
tree6b8384904f3164f008f0ace3c3fc316478bd1f80
parentd1ed75e03849f378af32a7613be9c877536b4587 (diff)
downloadmorph-709182b67f064eeca74ac9e79c1d91af1e7c86a9.tar.gz
fixup: style changes to morphsetbaserock/adamcoldrick/remove-morph2-wip
-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)