update rescue from the product log highlight

This commit is contained in:
Alexander Machehin 2014-10-08 19:03:09 +06:00
parent dbb1d19ac0
commit 3aebca9f3b
1 changed files with 3 additions and 1 deletions

View File

@ -39,8 +39,10 @@ class Platforms::ProductBuildListsController < Platforms::BaseController
end end
def log def log
worker_log = @product_build_list.abf_worker_log
render json: { render json: {
log: ( Pygments.highlight(@product_build_list.abf_worker_log, lexer: 'sh') rescue I18n.t('layout.build_lists.log.not_available')), log: ( Pygments.highlight(worker_log, lexer: 'sh') rescue worker_log),
building: @product_build_list.build_started? building: @product_build_list.build_started?
} }
end end