From 143d7fb29183009fd2788db245818bd65cb77303 Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Thu, 3 Jul 2014 14:23:02 +0000 Subject: Append .morph to any morph without a / that requires it If we ignore names with . in it's inconsistent with the current state of definitions.git: things break for the gstreamer-0.10 stratum and ruby-1.8 chunk, for example. --- morphlib/util.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/morphlib/util.py b/morphlib/util.py index 769731b8..752d69ad 100644 --- a/morphlib/util.py +++ b/morphlib/util.py @@ -69,9 +69,11 @@ def sanitise_morphology_path(morph_name): ''' # If it has a / or a . it must be a path, so return it unmolested - if '/' in morph_name or '.' in morph_name: + if '/' in morph_name: return morph_name # must be a name, appent .morph + elif morph_name.endswith('.morph'): + return morph_name else: return morph_name + '.morph' -- cgit v1.2.1