Commit 683d3d67 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

if urlnorm.norm fails, returns the input url as it is instead of None, that is...

if urlnorm.norm fails, returns the input url as it is instead of None, that is not expected as the result of 'asNormalizedURL()'.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@42810 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 2fa7eb24
...@@ -3318,7 +3318,7 @@ def urlnormNormaliseUrl(url, base_url=None): ...@@ -3318,7 +3318,7 @@ def urlnormNormaliseUrl(url, base_url=None):
except (AttributeError, UnicodeDecodeError, urlnorm.InvalidUrl): except (AttributeError, UnicodeDecodeError, urlnorm.InvalidUrl):
# This url is not valid, a better Exception will # This url is not valid, a better Exception will
# be raised # be raised
return return url
url_split = urlparse.urlsplit(url) url_split = urlparse.urlsplit(url)
url_protocol = url_split[0] url_protocol = url_split[0]
url_domain = url_split[1] url_domain = url_split[1]
......
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