def handle_meta(self, errcode, errmsg, headers): TempFileReader.handle_meta(self, errcode, errmsg, headers) if errcode == 200: try: ctype = headers['content-type'] except KeyError: return # Hope for the best if self.image_filters.has_key(ctype) and not isPILAllowed(): self.set_pipeline(self.image_filters[ctype])
def stop(self): TempFileReader.stop(self) if self.image: self.image.reader = None
def __init__(self, context, api, image): self.image = image self.url = self.image.url TempFileReader.__init__(self, context, api)