From f1da640a5b1ff984a4e26fb130334e4ebf2b8503 Mon Sep 17 00:00:00 2001 From: Pierre-Olivier Mercier Date: Tue, 25 Sep 2018 20:42:51 +0200 Subject: [PATCH] tools/web: fix isURL function --- nemubot/tools/web.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nemubot/tools/web.py b/nemubot/tools/web.py index 1a4fbd7..ab20643 100644 --- a/nemubot/tools/web.py +++ b/nemubot/tools/web.py @@ -23,7 +23,7 @@ from nemubot.exception import IMException def isURL(url): """Return True if the URL can be parsed""" o = urlparse(_getNormalizedURL(url)) - return o.netloc == "" and o.path == "" + return o.netloc != "" and o.path != "" def _getNormalizedURL(url):