Commit 14f66357 authored by R. David Murray's avatar R. David Murray

Merged revisions 87448 via svnmerge from

svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r87448 | r.david.murray | 2010-12-23 14:44:49 -0500 (Thu, 23 Dec 2010) | 4 lines

  #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.
........
parent e1367f3e
...@@ -299,8 +299,9 @@ class OpenerDirector: ...@@ -299,8 +299,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 = {}
...@@ -350,8 +351,6 @@ class OpenerDirector: ...@@ -350,8 +351,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)
......
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