mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 19:19:32 +01:00
httpserver: Fix crash if supybot.servers.http.favicon has not been set.
This commit is contained in:
parent
cdb14ec4f5
commit
90a1208e9e
@ -358,10 +358,10 @@ class Favicon(SupyHTTPServerCallback):
|
|||||||
name = 'favicon'
|
name = 'favicon'
|
||||||
defaultResponse = _('Request not handled')
|
defaultResponse = _('Request not handled')
|
||||||
def doGet(self, handler, path):
|
def doGet(self, handler, path):
|
||||||
|
response = None
|
||||||
file_path = conf.supybot.servers.http.favicon()
|
file_path = conf.supybot.servers.http.favicon()
|
||||||
found = False
|
found = False
|
||||||
if file_path:
|
if file_path:
|
||||||
response = None
|
|
||||||
try:
|
try:
|
||||||
icon = open(file_path, 'rb')
|
icon = open(file_path, 'rb')
|
||||||
response = icon.read()
|
response = icon.read()
|
||||||
|
Loading…
Reference in New Issue
Block a user