diff options
author | Adam Coldrick <adam.coldrick@codethink.co.uk> | 2014-08-14 13:45:59 +0000 |
---|---|---|
committer | Adam Coldrick <adam.coldrick@codethink.co.uk> | 2014-08-14 13:45:59 +0000 |
commit | c1c331e7c545c7a2f0545d3b1ef9751c9571d357 (patch) | |
tree | d2a4edf71f2c7204808e4543f3d743a81e95a1bd /morphlib/morphset.py | |
parent | b2786c73c0f4d4b76f824e309598ce57065e30ab (diff) | |
parent | 5f705f1e2c95b988ae39df7820f4034c49f375e4 (diff) | |
download | morph-c1c331e7c545c7a2f0545d3b1ef9751c9571d357.tar.gz |
Merge branch 'baserock/adamcoldrick/remove-morph2-tweaked'
Reviewed-by:
Richard Maw
Diffstat (limited to 'morphlib/morphset.py')
-rw-r--r-- | morphlib/morphset.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/morphlib/morphset.py b/morphlib/morphset.py index fa525973..bf061f94 100644 --- a/morphlib/morphset.py +++ b/morphlib/morphset.py @@ -127,7 +127,8 @@ class MorphologySet(object): specs = m[kind] for spec in specs: if cb_filter(m, kind, spec): - fn = morphlib.util.sanitise_morphology_path(spec['morph']) + fn = morphlib.util.sanitise_morphology_path( + 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: @@ -148,7 +149,8 @@ class MorphologySet(object): if m.ref != spec.get('ref'): m.ref = spec.get('ref') m.dirty = True - file = morphlib.util.sanitise_morphology_path(spec['morph']) + file = morphlib.util.sanitise_morphology_path( + 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.' @@ -162,7 +164,7 @@ class MorphologySet(object): ''' def wanted_spec(m, kind, spec): - spec_name = spec.get('name', spec['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) |