コード例 #1
0
ファイル: __init__.py プロジェクト: GunioRobot/fileconveyor
 def get_distribution_config(self, distribution_id):
     response = self.make_request('GET', '/%s/distribution/%s/config' % (self.Version, distribution_id))
     body = response.read()
     if response.status >= 300:
         raise CloudFrontServerError(response.status, response.reason, body)
     d = DistributionConfig(connection=self)
     d.etag = self.get_etag(response)
     h = handler.XmlHandler(d, self)
     xml.sax.parseString(body, h)
     return d
コード例 #2
0
 def get_distribution_config(self, distribution_id):
     response = self.make_request(
         'GET',
         '/%s/distribution/%s/config' % (self.Version, distribution_id))
     body = response.read()
     if response.status >= 300:
         raise CloudFrontServerError(response.status, response.reason, body)
     d = DistributionConfig(connection=self)
     d.etag = self.get_etag(response)
     h = handler.XmlHandler(d, self)
     xml.sax.parseString(body, h)
     return d