mirror of
https://github.com/e1ven/Robohash.git
synced 2025-06-23 21:35:02 +00:00
Remove unsupported exts
This commit is contained in:
parent
5e08944f63
commit
cd2ea07062
@ -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)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user