From 7320aecb7f065e94e20c57e36aedae46ed7a8ad1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Fri, 20 Mar 2015 09:35:12 +0100 Subject: [PATCH] do not crash if the ressourcepath is empty --- url_abuse_async.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/url_abuse_async.py b/url_abuse_async.py index 26db415..5b7d955 100644 --- a/url_abuse_async.py +++ b/url_abuse_async.py @@ -207,7 +207,8 @@ def get_urls(url, depth=1): base += ':{}'.format(port) if not meta_redir_url.startswith('/'): # relative redirect. resource_path has the initial '/' - base += fex.get_resource_path() + if fex.get_resource_path() is not None: + base += fex.get_resource_path() if not base.endswith('/'): base += '/' meta_redir_url = base + meta_redir_url