summaryrefslogtreecommitdiff
path: root/morphlib/morph2.py
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2012-09-24 16:44:49 +0100
committerSam Thursfield <sam.thursfield@codethink.co.uk>2012-09-24 16:44:49 +0100
commitb9c461638aecbee9ac568d089eba3c92d4c9910f (patch)
treecfe557c1a2aa249d59ea5c09a077f94972d09aee /morphlib/morph2.py
parentebd80b538fe558098561a3eaf44740fcd1bb9aae (diff)
downloadmorph-b9c461638aecbee9ac568d089eba3c92d4c9910f.tar.gz
Lookup chunks within strata by 'morph' field, not 'name'
'morph edit' is for editing source code, not built artifacts, so we should use the source morphology name.
Diffstat (limited to 'morphlib/morph2.py')
-rw-r--r--morphlib/morph2.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/morphlib/morph2.py b/morphlib/morph2.py
index 45d33d8a..73d55d1d 100644
--- a/morphlib/morph2.py
+++ b/morphlib/morph2.py
@@ -113,7 +113,7 @@ class Morphology(object):
return info
elif self['kind'] == 'stratum':
for info in self['chunks']:
- source_name = info.get('alias', info['name'])
+ source_name = info.get('alias', info['morph'])
if source_name == name:
return info
raise KeyError('"%s" not found' % name)