diff options
author | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2014-07-03 14:23:02 +0000 |
---|---|---|
committer | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2014-07-03 14:42:30 +0000 |
commit | 143d7fb29183009fd2788db245818bd65cb77303 (patch) | |
tree | 82577ccfe1fab0bc6a6b4cd7b9ac3452a13a7189 | |
parent | 4937af6c359094b3929a5a0632368287ca7bb662 (diff) | |
download | morph-143d7fb29183009fd2788db245818bd65cb77303.tar.gz |
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.
-rw-r--r-- | morphlib/util.py | 4 |
1 files changed, 3 insertions, 1 deletions
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' |