httpserver: Fix crash if supybot.servers.http.favicon has not been set.

This commit is contained in:
Valentin Lorentz 2014-04-15 18:39:44 +00:00
parent cdb14ec4f5
commit 90a1208e9e
1 changed files with 1 additions and 1 deletions

View File

@ -358,10 +358,10 @@ class Favicon(SupyHTTPServerCallback):
name = 'favicon'
defaultResponse = _('Request not handled')
def doGet(self, handler, path):
response = None
file_path = conf.supybot.servers.http.favicon()
found = False
if file_path:
response = None
try:
icon = open(file_path, 'rb')
response = icon.read()