mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 11:09:23 +01:00
httpserver: Fix favicon handling.
This commit is contained in:
parent
33262e125f
commit
048c1e77f4
@ -361,15 +361,15 @@ class Favicon(SupyHTTPServerCallback):
|
||||
file_path = conf.supybot.servers.http.favicon()
|
||||
found = False
|
||||
if file_path:
|
||||
response = None
|
||||
try:
|
||||
icon = open(file_path, 'r')
|
||||
found = True
|
||||
response = icon.read()
|
||||
except IOError:
|
||||
pass
|
||||
finally:
|
||||
icon.close()
|
||||
if found:
|
||||
response = icon.read()
|
||||
if response is not None:
|
||||
filename = file_path.rsplit(os.sep, 1)[1]
|
||||
if '.' in filename:
|
||||
ext = filename.rsplit('.', 1)[1]
|
||||
|
Loading…
Reference in New Issue
Block a user