From fe0492686334601e07a9cbb140c9dc7ae508b2bc Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Tue, 7 Jul 2015 18:03:30 +0100 Subject: schema: Ensure unpetrify-ref is a string This error was spotted using the Apache Jena OWL Reasoner's validate() method. Change-Id: Ic7cae443987601d30ae47729cc5799064e035a6e --- schema/parse.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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, -- cgit v1.2.1