Permalink
Browse files

Returns nil if s3 bucket does not exist on a get. Was raising before.

  • Loading branch information...
1 parent d2a1e96 commit 3e24fd767fd0cde6cc52b4404fbc57f9f6f3e381 @treeder treeder committed Feb 8, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/simple_record/attributes.rb
@@ -365,7 +365,7 @@ def get_attribute(name)
# puts 'got from s3 ' + ret.inspect
SimpleRecord.stats.s3_gets += 1
rescue Aws::AwsError => ex
- if ex.include? /NoSuchKey/
+ if ex.include?(/NoSuchKey/) || ex.include?(/NoSuchBucket/)
ret = nil
else
raise ex

0 comments on commit 3e24fd7

Please sign in to comment.