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
c7456d95ba
commit
aab3c87d8b
@ -229,18 +229,16 @@ class ImgHandler(tornado.web.RequestHandler):
|
|||||||
|
|
||||||
|
|
||||||
#Change to a usuable format
|
#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)]
|
ext = string[string.rfind('.') +1 :len(string)]
|
||||||
if ext.lower() == 'jpg':
|
if ext.lower() == 'jpg':
|
||||||
ext = 'jpeg'
|
ext = 'jpeg'
|
||||||
if ext.lower() == 'tif':
|
|
||||||
ext = 'tiff'
|
|
||||||
else:
|
else:
|
||||||
ext = "png"
|
ext = "png"
|
||||||
|
|
||||||
|
|
||||||
if client_ignoreext != "false":
|
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('.')]
|
string = string[0:string.rfind('.')]
|
||||||
r = Robohash(string)
|
r = Robohash(string)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user