Commit 88948cc8 authored by Simon Delamare's avatar Simon Delamare
Browse files

[lib] kwollect : fix when directory to backup does not exist

parent 373428e6
......@@ -27,7 +27,9 @@ def generate_puppet_kwollectg5k(options)
next unless options[:sites].include?(site_uid)
FileUtils.mv("#{options[:output_dir]}//platforms/production/modules/generated/files/grid5000/kwollect/#{site_uid}", "#{backup_dir}/")
if File.directory?("#{options[:output_dir]}//platforms/production/modules/generated/files/grid5000/kwollect/#{site_uid}")
FileUtils.mv("#{options[:output_dir]}//platforms/production/modules/generated/files/grid5000/kwollect/#{site_uid}", "#{backup_dir}/")
end
# Metrics configuration for each node
site['clusters'].sort.each { |cluster_uid, cluster|
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment