summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiago Gomes <tiago.gomes@codethink.co.uk>2015-12-07 10:20:18 (GMT)
committerSam Thursfield <sam.thursfield@codethink.co.uk>2015-12-21 10:58:48 (GMT)
commita7431e36e66f0a263cc940fb2718eb934ab4b247 (patch)
treea540cd4be597143cd998ce6ebcd1bd5ad0ab9704
parent7d5804051531147298085d4db1b81ffd4b3c10c6 (diff)
downloadmorph-a7431e36e66f0a263cc940fb2718eb934ab4b247.tar.gz
morphloader: remove alias
The field 'alias' is not defined in the schema for definitions version 7. Change-Id: Id595562258ebe4c3f228cf3f04456e7f69ce63ae
-rw-r--r--morphlib/morphloader.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/morphlib/morphloader.py b/morphlib/morphloader.py
index 05ffd0b..ff433d7 100644
--- a/morphlib/morphloader.py
+++ b/morphlib/morphloader.py
@@ -509,7 +509,7 @@ class MorphologyLoader(object):
# All stratum names should be unique within a system.
names = set()
for spec in strata:
- name = spec.get('alias', spec['morph'])
+ name = spec['morph']
if name in names:
raise DuplicateStratumError(morph['name'], name)
names.add(name)
@@ -544,24 +544,23 @@ class MorphologyLoader(object):
# All chunk names must be unique within a stratum.
names = set()
for spec in morph['chunks']:
- name = spec.get('alias', spec['name'])
+ name = spec['name']
if name in names:
raise DuplicateChunkError(morph['name'], name)
names.add(name)
# Check each reference to a chunk.
for spec in morph['chunks']:
- chunk_name = spec.get('alias', spec['name'])
+ chunk_name = spec['name']
# All chunk refs must be strings.
if 'ref' in spec:
ref = spec['ref']
if ref == None:
- raise EmptyRefError(
- spec.get('alias', spec['name']), morph.filename)
+ raise EmptyRefError(spec['name'], morph.filename)
elif not isinstance(ref, basestring):
raise ChunkSpecRefNotStringError(
- ref, spec.get('alias', spec['name']), morph.filename)
+ ref, spec['name'], morph.filename)
# The build-depends field must be a list.
if 'build-depends' in spec: