From f8f471e7ee80e4c8546b0d35c503f128386b8f5c Mon Sep 17 00:00:00 2001 From: Boris Bobrov Date: Thu, 12 Jul 2018 12:50:37 +0200 Subject: [PATCH] finally fix url validator --- mediagoblin/tools/validator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mediagoblin/tools/validator.py b/mediagoblin/tools/validator.py index 26c75d95..93296eab 100644 --- a/mediagoblin/tools/validator.py +++ b/mediagoblin/tools/validator.py @@ -14,7 +14,7 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . -import six +from six.moves.urllib.parse import urlparse def validate_email(email): """ @@ -31,7 +31,7 @@ def validate_url(url): Returns True if valid and False if invalid """ try: - six.moves.urlparse(url) + urlparse(url) return True except Exception as e: return False -- 2.25.1