Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion tools/ports/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,8 @@ def retrieve():
import requests
response = requests.get(url)
data = response.content
except ImportError:
except (ImportError, requests.exceptions.InvalidSchema):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does requests not support the file:// scheme? If so perhaps add a comment about that here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

# requests does not support 'file://' protocol and raises InvalidSchema
from urllib.request import urlopen
f = urlopen(url)
data = f.read()
Expand Down