bucket.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:Chromium_DepotTools 作者: p07r0457 项目源码 文件源码
def get_website_configuration_with_xml(self, headers=None):
        """
        Returns the current status of website configuration on the bucket as
        unparsed XML.

        :rtype: 2-Tuple
        :returns: 2-tuple containing:
        1) A dictionary containing a Python representation
                  of the XML response. The overall structure is:
          * WebsiteConfiguration
            * IndexDocument
              * Suffix : suffix that is appended to request that
                is for a "directory" on the website endpoint
              * ErrorDocument
                * Key : name of object to serve when an error occurs
        2) unparsed XML describing the bucket's website configuration.
        """
        response = self.connection.make_request('GET', self.name,
                query_args='website', headers=headers)
        body = response.read()
        boto.log.debug(body)

        if response.status != 200:
            raise self.connection.provider.storage_response_error(
                response.status, response.reason, body)

        e = boto.jsonresponse.Element()
        h = boto.jsonresponse.XmlHandler(e, None)
        h.parse(body)
        return e, body
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号