# File lib/openstack/swift/connection.rb, line 147
    def delete_container(containername)
      path = "/#{URI.encode(containername.to_s)}"
      begin
        @connection.req("DELETE", path)
      rescue OpenStack::Exception::ResourceStateConflict => conflict
        msg = "The container: \"#{containername}\" is not empty. #{conflict.message}"
        raise OpenStack::Exception::ResourceStateConflict.new(msg, conflict.response_code, conflict.response_body)
      rescue OpenStack::Exception::ItemNotFound => not_found
        msg = "The container: \"#{containername}\" does not exist. #{not_found.message}"
        raise OpenStack::Exception::ItemNotFound.new(msg, not_found.response_code, not_found.response_body)
      end
      true
    end