Skip to content

Commit 1dfd0cf

Browse files
committed
Merge pull request bbc#267 from BBC-News/folder_bugfix
Handle invalid data
2 parents 5e25527 + 03dff09 commit 1dfd0cf

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/wraith/folder.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,12 @@ def tidy_shots_folder(dirs)
6969
def threshold_rate(dirs)
7070
dirs.each do |_folder_name, shot_info|
7171
shot_info.each do |_k, v|
72-
if v[:data] > wraith.threshold
73-
return false
72+
begin
73+
if v[:data] > wraith.threshold
74+
return false
75+
end
76+
rescue
77+
return true
7478
end
7579
end
7680
end

0 commit comments

Comments
 (0)