From 45655da4505ba03c84f634501ba8e8eee6f920a4 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Fri, 30 Mar 2012 16:25:26 +0100 Subject: Make build system class return artificial text for missing morphology --- morphlib/buildsystem.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'morphlib/buildsystem.py') diff --git a/morphlib/buildsystem.py b/morphlib/buildsystem.py index ba6d8998..8b71a640 100644 --- a/morphlib/buildsystem.py +++ b/morphlib/buildsystem.py @@ -40,6 +40,20 @@ class BuildSystem(object): def __getitem__(self, key): key = '_'.join(key.split('-')) return getattr(self, key) + + def get_morphology_text(self, name): + '''Return the text of an autodetected chunk morphology.''' + + return ''' + { + "name": "%(name)s", + "kind": "chunk", + "build-system": "%(bs)s" + } + ''' % { + 'name': name, + 'bs': self.name, + } def used_by_project(self, srcdir): '''Does project at ``srcdir`` use this build system?''' -- cgit v1.2.1