mirror of
https://github.com/python/cpython.git
synced 2025-11-03 19:34:08 +00:00
#4496: remove misleading comment and note that self.handlers is obsolete.
self.handlers is still used in one urllib2 test, but not by the code iteslf.
This commit is contained in:
parent
a63c240847
commit
25b8cca6e8
1 changed files with 2 additions and 3 deletions
|
|
@ -275,8 +275,9 @@ class OpenerDirector:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
client_version = "Python-urllib/%s" % __version__
|
client_version = "Python-urllib/%s" % __version__
|
||||||
self.addheaders = [('User-agent', client_version)]
|
self.addheaders = [('User-agent', client_version)]
|
||||||
# manage the individual handlers
|
# self.handlers is retained only for backward compatibility
|
||||||
self.handlers = []
|
self.handlers = []
|
||||||
|
# manage the individual handlers
|
||||||
self.handle_open = {}
|
self.handle_open = {}
|
||||||
self.handle_error = {}
|
self.handle_error = {}
|
||||||
self.process_response = {}
|
self.process_response = {}
|
||||||
|
|
@ -326,8 +327,6 @@ class OpenerDirector:
|
||||||
added = True
|
added = True
|
||||||
|
|
||||||
if added:
|
if added:
|
||||||
# the handlers must work in an specific order, the order
|
|
||||||
# is specified in a Handler attribute
|
|
||||||
bisect.insort(self.handlers, handler)
|
bisect.insort(self.handlers, handler)
|
||||||
handler.add_parent(self)
|
handler.add_parent(self)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue