1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

M #-: onecfg suppress Ruby Augeas warnings

This commit is contained in:
Vlastimil Holer 2021-03-30 22:06:13 +02:00
parent 3269e2c69e
commit 0b7ba05032
No known key found for this signature in database
GPG Key ID: EB549BADEFD07C53

View File

@ -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")