aboutsummaryrefslogtreecommitdiff
path: root/modules/title.py
diff options
context:
space:
mode:
authorGravatar jesopo2019-02-28 23:30:09 +0000
committerGravatar jesopo2019-02-28 23:30:09 +0000
commit4467ba8ab6ae487ee8d8f0e765f61f4f607df400 (patch)
treec46798ea1dbe7e892dd2ad53a5c96397ac319929 /modules/title.py
parentRaise a specific exception in utils.http.request for "wrong content type" (diff)
signature
specifically handle HTTPWrongContentTypeException in title.py
Diffstat (limited to 'modules/title.py')
-rw-r--r--modules/title.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/title.py b/modules/title.py
index c7e4f515..b3d2fd85 100644
--- a/modules/title.py
+++ b/modules/title.py
@@ -13,6 +13,8 @@ class Module(ModuleManager.BaseModule):
except Exception as e:
self.log.error("failed to get URL title", [], exc_info=True)
return None
+ except utils.http.HTTPWrongContentTypeException:
+ return None
if page.data.title:
return page.data.title.text.replace("\n", " ").replace(
"\r", "").replace(" ", " ").strip()