mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-20 01:19:26 +01:00
Web: Fix exception raised due to lack of Content-Type
This commit is contained in:
parent
bdbc79bfc6
commit
8dbf37a173
@ -279,6 +279,8 @@ class Web(callbacks.PluginRegexp):
|
|||||||
try:
|
try:
|
||||||
try:
|
try:
|
||||||
size = fd.headers['Content-Length']
|
size = fd.headers['Content-Length']
|
||||||
|
if size is None:
|
||||||
|
raise KeyError('content-length')
|
||||||
irc.reply(format(_('%u is %S long.'), url, int(size)))
|
irc.reply(format(_('%u is %S long.'), url, int(size)))
|
||||||
except KeyError:
|
except KeyError:
|
||||||
size = conf.supybot.protocols.http.peekSize()
|
size = conf.supybot.protocols.http.peekSize()
|
||||||
|
Loading…
Reference in New Issue
Block a user