mirror of
https://github.com/OpenNebula/one.git
synced 2024-12-24 21:34:01 +03:00
feature #2371: raise exception and cli error when nokogiri is not installed
This commit is contained in:
parent
28227cc360
commit
27224f09ac
@ -16,7 +16,13 @@
|
||||
|
||||
require 'cli_helper'
|
||||
|
||||
require 'opennebula'
|
||||
begin
|
||||
require 'opennebula'
|
||||
rescue Exception => e
|
||||
puts "Error: "+e.message.to_s
|
||||
exit(-1)
|
||||
end
|
||||
|
||||
include OpenNebula
|
||||
|
||||
module OpenNebulaHelper
|
||||
|
@ -129,5 +129,7 @@ module OpenNebula
|
||||
alias :cdata_block :characters
|
||||
end
|
||||
end
|
||||
else
|
||||
raise "nokogiri gem not installed."
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user