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