def get_distribution_info(self, distribution_id): response = self.make_request('GET', '/%s/distribution/%s' % (self.Version, distribution_id)) body = response.read() if response.status >= 300: raise CloudFrontServerError(response.status, response.reason, body) d = Distribution(connection=self) response_headers = response.msg for key in response_headers.keys(): if key.lower() == 'etag': d.etag = response_headers[key] h = handler.XmlHandler(d, self) xml.sax.parseString(body, h) return d
def get_distribution_info(self, distribution_id): response = self.make_request( 'GET', '/%s/distribution/%s' % (self.Version, distribution_id)) body = response.read() if response.status >= 300: raise CloudFrontServerError(response.status, response.reason, body) d = Distribution(connection=self) response_headers = response.msg for key in response_headers.keys(): if key.lower() == 'etag': d.etag = response_headers[key] h = handler.XmlHandler(d, self) xml.sax.parseString(body, h) return d