Skip to content

Commit

Permalink
✨ Expand the definition of template_type in targets section
Browse files Browse the repository at this point in the history
  • Loading branch information
ayan-b committed Mar 1, 2019
1 parent 0b3ba3d commit 334081d
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions moban/mobanfile/targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 334081d

Please sign in to comment.