mirror of
https://github.com/OpenNebula/one.git
synced 2026-12-02 05:06:14 +09:00
M #-: onecfg suppress Ruby Augeas warnings
This commit is contained in:
1 file changed
+13
-4
@@ -64,10 +64,19 @@ module OneCfg::Config::Type
|
||||
:root => work_file_dir,
|
||||
:loadpath => @load_path)
|
||||
|
||||
aug.clear_transforms
|
||||
aug.transform(:lens => @lens, :incl => work_file_name)
|
||||
aug.context = "/files/#{work_file_name}"
|
||||
aug.load
|
||||
begin
|
||||
# Temporarily suppress Ruby warnings due to
|
||||
# augeas.rb:378: warning: constant ::Fixnum is deprecated
|
||||
verb = $VERBOSE
|
||||
$VERBOSE = nil
|
||||
|
||||
aug.clear_transforms
|
||||
aug.transform(:lens => @lens, :incl => work_file_name)
|
||||
aug.context = "/files/#{work_file_name}"
|
||||
aug.load
|
||||
ensure
|
||||
$VERBOSE = verb
|
||||
end
|
||||
|
||||
# validate there was no Augeas error
|
||||
if aug.exists("/augeas#{aug.context}/error")
|
||||
|
||||
Reference in new issue
Block a user