summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2014-09-04 12:09:31 +0100
committerSam Thursfield <sam.thursfield@codethink.co.uk>2014-09-11 13:26:27 +0100
commit82665d5a655fab6adea0ab0fac6151ecf285312d (patch)
treeaeb95a0b1e97ed520ae1446c6fb445ec0de051c5
parentb9e92ac70f6fc4c6edb3f1f95308ea253603bba6 (diff)
downloadmorph-82665d5a655fab6adea0ab0fac6151ecf285312d.tar.gz
Allow arbitrary x- fields in morphologies
This allows tools other than Morph to store information in morphologies. While this probably shouldn't be encouraged, it's proved very useful during development of the import tool.
-rw-r--r--morphlib/morphloader.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/morphlib/morphloader.py b/morphlib/morphloader.py
index bc7ab6ef..eeefbe65 100644
--- a/morphlib/morphloader.py
+++ b/morphlib/morphloader.py
@@ -661,7 +661,7 @@ class MorphologyLoader(object):
def _deny_unknown_fields(self, allowed, morphology):
for field in morphology:
- if field not in allowed:
+ if field not in allowed and not field.startswith('x-'):
raise InvalidFieldError(field, morphology.filename)
def set_defaults(self, morphology):