import backend
class IUseImage(BaseHandler):
- def get_error_html(self, status_code, **kwargs):
+ def write_error(self, status_code, **kwargs):
"""
Select a random image from the errors directory
and return the content.
image = random.choice(images)
image = os.path.join(template_path, image)
+ imgdata = None
with open(image, "rb") as f:
- return f.read()
+ imgdata = f.read()
+
+ self.finish(imgdata)
def get(self, profile_id, image_id):
image = None