Example #1
0
 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])
Example #2
0
 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])
Example #3
0
 def stop(self):
     TempFileReader.stop(self)
     if self.image:
         self.image.reader = None
Example #4
0
 def __init__(self, context, api, image):
     self.image = image
     self.url = self.image.url
     TempFileReader.__init__(self, context, api)
Example #5
0
 def stop(self):
     TempFileReader.stop(self)
     if self.image:
         self.image.reader = None
Example #6
0
 def __init__(self, context, api, image):
     self.image = image
     self.url = self.image.url
     TempFileReader.__init__(self, context, api)