Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #9231 - Require English lib and fix ENC failure #2131

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions app/controllers/hosts_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,12 @@ def externalNodes
format.html { render :text => "<pre>#{ERB::Util.html_escape(@host.info.to_yaml)}</pre>" }
format.yml { render :text => @host.info.to_yaml }
end
rescue
rescue => e
# failed
logger.warn "Failed to generate external nodes for #{@host} with #{$ERROR_INFO}"
render :text => _('Unable to generate output, Check log files\n'), :status => 412 and return
logger.warn "Failed to generate external nodes for #{@host} with #{e}"
logger.debug(e.backtrace.join("\n"))
render :text => _('Unable to generate output, Check log files'),
:status => :precondition_failed
end
end

Expand Down
1 change: 1 addition & 0 deletions config/initializers/foreman.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
require 'foreman/provision' if SETTINGS[:unattended]
require 'foreman'
require 'filters_helper_overrides'
require 'English'

# We may be executing something like rake db:migrate:reset, which destroys this table
# only continue if the table exists
Expand Down