From 334081dca5d95cdecf06600bb36314b72839a332 Mon Sep 17 00:00:00 2001 From: Ayan Banerjee Date: Sat, 2 Mar 2019 02:00:35 +0530 Subject: [PATCH] :sparkles: Expand the definition of template_type in targets section Closes https://github.com/moremoban/moban/issues/234 --- moban/mobanfile/targets.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/moban/mobanfile/targets.py b/moban/mobanfile/targets.py index 0dde328f..739d477b 100644 --- a/moban/mobanfile/targets.py +++ b/moban/mobanfile/targets.py @@ -33,19 +33,16 @@ def _handle_explicit_target(options, target): ) data_file = target.get(constants.LABEL_CONFIG, common_data_file) output = target[constants.LABEL_OUTPUT] - needs_ad_hoc = False template_type = target.get(constants.LABEL_TEMPLATE_TYPE) - if ( - constants.TEMPLATE_TYPES_OPTIONS in template_type or - constants.LABEL_EXTENSIONS in template_type - ): + needs_ad_hoc = False + if constants.LABEL_OVERRIDES in template_type[0]: needs_ad_hoc = True for src, dest, t_type in handle_template( template_file, output, options[constants.LABEL_TMPL_DIRS] ): if template_type: yield TemplateTarget(src, data_file, dest, template_type, - needs_ad_hoc=True) + needs_ad_hoc) else: if t_type: yield TemplateTarget(src, data_file, dest, t_type)