added exception
This commit is contained in:
parent
5ded388eb3
commit
9774525d56
@ -13,6 +13,7 @@ clientbucket_path ||= "/var/lib/puppet/clientbucket"
|
||||
|
||||
available_files = Array.new
|
||||
|
||||
begin
|
||||
Find.find(clientbucket_path) do |file_path|
|
||||
|
||||
# Skip directories and "contents" files
|
||||
@ -40,7 +41,9 @@ Find.find(clientbucket_path) do |file_path|
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
rescue
|
||||
puts "Unable to open file path #{clientbucket_path}"
|
||||
end
|
||||
# See if we found any files for the user
|
||||
if available_files.length == 0
|
||||
puts "No files with path #{target_path} exist in the clientbucket"
|
||||
|
Loading…
Reference in New Issue
Block a user