Skip to content

Commit

Permalink
Add delete_if_exists
Browse files Browse the repository at this point in the history
  • Loading branch information
kuon committed Dec 5, 2014
1 parent de0807d commit 696ac32
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/swift_storage/node.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ def delete
request(relative_path, :method => :delete)
end

def delete_if_exists
delete rescue SwiftStorage::NotFoundError
end


private

Expand Down

0 comments on commit 696ac32

Please sign in to comment.