Commit 88abfb38 authored by Julien Muchembled's avatar Julien Muchembled

Revert [41642] ("InvaliUrl Exception is only available from urlnorm version 1.0.1")

InvalidUrl exception already exists in version 1.0

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@41757 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 64c4b04d
......@@ -3255,11 +3255,11 @@ def legacyNormalizeUrl(url, base_url=None):
def urlnormNormaliseUrl(url, base_url=None):
"""The normalisation up is delegated to urlnorm library.
"""
InvalidURLException = getattr(urlnorm, 'InvalidUrl', AttributeError)
try:
url = urlnorm.norm(url)
except InvalidURLException:
# This url is not valid
except (AttributeError, urlnorm.InvalidUrl):
# This url is not valid, a better Exception will
# be raised
return
url_split = urlparse.urlsplit(url)
url_protocol = url_split[0]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment