finally fix url validator
authorBoris Bobrov <breton@cynicmansion.ru>
Thu, 12 Jul 2018 10:50:37 +0000 (12:50 +0200)
committerBoris Bobrov <breton@cynicmansion.ru>
Thu, 12 Jul 2018 10:50:37 +0000 (12:50 +0200)
mediagoblin/tools/validator.py

index 26c75d952ac7b5be3a7b9f3e35b600da042d223a..93296eab99421c9a377ce3ede7978efa4a0a9c1b 100644 (file)
@@ -14,7 +14,7 @@
 # You should have received a copy of the GNU Affero General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-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