[cleanup] Minor fixes
This commit is contained in:
parent
80e8493ee7
commit
21633673c3
8 changed files with 26 additions and 18 deletions
|
|
@ -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 = (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue