mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
SF patch #1028908
(John J Lee) Minor code clarification and simplification.
This commit is contained in:
parent
bab4143348
commit
f7bf02ded5
1 changed files with 6 additions and 3 deletions
|
@ -304,10 +304,13 @@ class OpenerDirector:
|
|||
self.handle_error[protocol] = lookup
|
||||
elif condition == "open":
|
||||
kind = protocol
|
||||
lookup = getattr(self, "handle_"+condition)
|
||||
elif condition in ["response", "request"]:
|
||||
lookup = self.handle_open
|
||||
elif condition == "response":
|
||||
kind = protocol
|
||||
lookup = getattr(self, "process_"+condition)
|
||||
lookup = self.process_response
|
||||
elif condition == "request":
|
||||
kind = protocol
|
||||
lookup = self.process_request
|
||||
else:
|
||||
continue
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue