Modules: avoid unhandled exception in all_post

This commit is contained in:
nemunaire 2015-10-13 07:49:53 +02:00
commit 76ec0d26b4
3 changed files with 3 additions and 7 deletions

View file

@ -82,7 +82,7 @@ def parselisten(msg):
@hook("all_post")
def parseresponse(msg):
global LAST_URLS
if hasattr(msg, "text"):
if hasattr(msg, "text") and msg.text:
urls = re.findall("([a-zA-Z0-9+.-]+:(?://)?[^ :]+)", msg.text)
for url in urls:
o = urlparse(url)