fix missing file

This commit is contained in:
ppwwyyxx
2014-12-21 21:23:44 +08:00
parent 1a5ae2b1f2
commit 41982c3f2d
4 changed files with 24 additions and 4 deletions
+4 -2
View File
@@ -1,7 +1,7 @@
#!/usr/bin/env python2
# -*- coding: UTF-8 -*-
# File: render.py
# Date: Sat Dec 20 20:15:47 2014 +0800
# Date: Sun Dec 21 21:21:53 2014 +0800
# Author: Yuxin Wu <[email protected]>
import os
@@ -90,7 +90,9 @@ class HTMLRender(object):
bigimgpath = self.parser.imginfo.get(msg.msgSvrId)
fnames = [k for k in [imgpath, bigimgpath] if k is not None]
bigimg, smallimg = self.res.get_img(fnames)
assert smallimg
if not smallimg:
logger.warn("No image thumbnail found for {}".format(imgpath))
return fallback()
# TODO do not show fancybox when no bigimg found
return template.format(sender_label=sender,
small_img=smallimg,