Skip to content

Commit

Permalink
FIX: Also removing use of undefined 'invalid_image_name' (possibly re…
Browse files Browse the repository at this point in the history
…gression caused by bbc#578) and just reverting to hard-coded 'invalid.jpg' from before.
  • Loading branch information
patricknelson committed Jul 20, 2019
1 parent 5049506 commit 0f23331
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/wraith/save_images.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def parallel_task(jobs)
end
rescue => e
logger.error "#{e}\n URL = #{url}"
create_invalid_image(filename, width, invalid_image_name)
create_invalid_image(filename, width)
end
end
end
Expand Down Expand Up @@ -177,9 +177,9 @@ def image_was_created(filename)
wraith.resize or File.exist? filename
end

def create_invalid_image(filename, width, invalid_image_name)
def create_invalid_image(filename, width)
logger.warn "Using fallback image instead"
invalid = File.expand_path("../../assets/#{invalid_image_name}", File.dirname(__FILE__))
invalid = File.expand_path("../../assets/invalid.jg", File.dirname(__FILE__))
FileUtils.cp invalid, filename

set_image_width(filename, width)
Expand Down

0 comments on commit 0f23331

Please sign in to comment.