summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2015-07-07 18:03:30 +0100
committerSam Thursfield <sam.thursfield@codethink.co.uk>2015-07-07 18:03:30 +0100
commitfe0492686334601e07a9cbb140c9dc7ae508b2bc (patch)
tree25dd6ea2a259fd74198e07150921e5ec423ecc68
parentb30492792e87532c7ba45766cdb79e4d00c61822 (diff)
downloaddefinitions-fe0492686334601e07a9cbb140c9dc7ae508b2bc.tar.gz
schema: Ensure unpetrify-ref is a string
This error was spotted using the Apache Jena OWL Reasoner's validate() method. Change-Id: Ic7cae443987601d30ae47729cc5799064e035a6e
-rw-r--r--schema/parse.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/schema/parse.py b/schema/parse.py
index ed520e73..d0ffc8aa 100644
--- a/schema/parse.py
+++ b/schema/parse.py
@@ -257,8 +257,10 @@ def load_all_morphologies(path='.'):
chunk_ref.set(BASEROCK.repo, rdflib.Literal(entry['repo']))
chunk_ref.set(BASEROCK.ref, rdflib.Literal(entry['ref']))
if 'unpetrify-ref' in entry:
+ # This needs to be converted to a string as it may be
+ # parsed as a floating point number by PyYAML.
chunk_ref.set(BASEROCK.unpetrifyRef,
- rdflib.Literal(entry['unpetrify-ref']))
+ rdflib.Literal(str(entry['unpetrify-ref'])))
chunk_ref.set(BASEROCK.buildMode,
rdflib.Literal(entry.get('build-mode', 'normal')))
chunk_ref.set(BASEROCK.prefix,