From 677d28b0159fe26fad8e05d7ecd0aaaadb84ad5e Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Wed, 7 Oct 2015 03:48:32 -0400 Subject: [PATCH] Don't error when composing the build number on non Git deploys. --- mayan/apps/common/templatetags/common_tags.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mayan/apps/common/templatetags/common_tags.py b/mayan/apps/common/templatetags/common_tags.py index 283b2c1f0c..a4f6b40b42 100644 --- a/mayan/apps/common/templatetags/common_tags.py +++ b/mayan/apps/common/templatetags/common_tags.py @@ -70,6 +70,9 @@ def render_subtemplate(context, template_name, template_context): @register.assignment_tag def build(): if BUILD: - return '{} {}'.format(BUILD(), DATE().decode()) + try: + return '{} {}'.format(BUILD(), DATE().decode()) + except sh.ErrorReturnCode_128: + return '' else: - return 'No build information' + return ''