From 6150d3323d45fde01e5938f5856d08bf6205000d Mon Sep 17 00:00:00 2001 From: j Date: Mon, 6 Aug 2018 19:19:20 +0100 Subject: [PATCH] other --- ontology/update.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ontology/update.py b/ontology/update.py index b0acdab..de51c31 100755 --- a/ontology/update.py +++ b/ontology/update.py @@ -41,7 +41,11 @@ if __name__ == '__main__': tree = defaultdict(dict) for keyword in keywords: - parent, child = keyword.split(': ') + if ': ' not in keyword: + parent = 'other' + child = keyword + else: + parent, child = keyword.split(': ', 1) path = find_path(parent) if path: p = tree