projects
/
mediagoblin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
99a3e4c
)
finally fix url validator
author
Boris Bobrov
<breton@cynicmansion.ru>
Thu, 12 Jul 2018 10:50:37 +0000
(12:50 +0200)
committer
Boris Bobrov
<breton@cynicmansion.ru>
Thu, 12 Jul 2018 10:50:37 +0000
(12:50 +0200)
mediagoblin/tools/validator.py
patch
|
blob
|
blame
|
history
diff --git
a/mediagoblin/tools/validator.py
b/mediagoblin/tools/validator.py
index 26c75d952ac7b5be3a7b9f3e35b600da042d223a..93296eab99421c9a377ce3ede7978efa4a0a9c1b 100644
(file)
--- 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 <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