From: Boris Bobrov Date: Thu, 12 Jul 2018 10:50:37 +0000 (+0200) Subject: finally fix url validator X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=f8f471e7ee80e4c8546b0d35c503f128386b8f5c;p=mediagoblin.git finally fix url validator --- 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