Commit 9de262f5 authored by Stefano Mazzucco's avatar Stefano Mazzucco

Disambiguate patched URL opener

As per @reinout comments in PR #253, let's make it clear that we're
assigning request._urlopener to a patched URL opener.
parent 9299c184
......@@ -24,10 +24,10 @@ try:
from urllib.parse import urlparse
from urllib import request
class URLOpener(FancyURLopener):
class PatchedURLopener(FancyURLopener):
http_error_default = URLopener.http_error_default
request._urlopener = URLOpener() # Ook! Monkey patch!
request._urlopener = PatchedURLopener() # Ook! Monkey patch!
except ImportError:
# Python 2
......
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