1
0
Fork 0

[cleanup] Minor fixes

This commit is contained in:
pukkandan 2022-05-18 09:04:30 +05:30
commit 21633673c3
No known key found for this signature in database
GPG key ID: 7EEE9E1E817D0A39
8 changed files with 26 additions and 18 deletions

View file

@ -714,7 +714,9 @@ def sanitize_path(s, force=False):
def sanitize_url(url):
# Prepend protocol-less URLs with `http:` scheme in order to mitigate
# the number of unwanted failures due to missing protocol
if url.startswith('//'):
if url is None:
return
elif url.startswith('//'):
return 'http:%s' % url
# Fix some common typos seen so far
COMMON_TYPOS = (