Remove unsupported exts

This commit is contained in:
Robohash 2011-08-30 18:39:55 -04:00
parent 5e08944f63
commit cd2ea07062

View File

@ -229,18 +229,16 @@ class ImgHandler(tornado.web.RequestHandler):
#Change to a usuable format
if string.endswith(('.png','.gif','.jpg','.bmp','.im','.jpeg','.pcx','.ppm','.tiff','.xbm','.tif')):
if string.endswith(('.png','.gif','.jpg','.bmp','.jpeg','.ppm')):
ext = string[string.rfind('.') +1 :len(string)]
if ext.lower() == 'jpg':
ext = 'jpeg'
if ext.lower() == 'tif':
ext = 'tiff'
else:
ext = "png"
if client_ignoreext != "false":
if string.endswith(('.png','.gif','.jpg','.bmp','.im','.jpeg','.pcx','.ppm','.tiff','.xbm','tif')):
if string.endswith(('.png','.gif','.jpg','.bmp','.jpeg','.ppm')):
string = string[0:string.rfind('.')]
r = Robohash(string)