refactor ec2 response structure
This commit is contained in:
parent
1d42cc3f53
commit
568d99dd42
5 changed files with 65 additions and 39 deletions
|
|
@ -470,19 +470,19 @@ class Entry(Py3kObject):
|
|||
self.method = method
|
||||
self.uri = uri
|
||||
|
||||
if isinstance(body, types.FunctionType):
|
||||
if callable(body):
|
||||
self.dynamic_response = True
|
||||
else:
|
||||
self.dynamic_response = False
|
||||
|
||||
self.body = body
|
||||
self.streaming = streaming
|
||||
|
||||
if self.dynamic_response or self.streaming:
|
||||
self.body_length = 0
|
||||
else:
|
||||
self.body_length = len(self.body or '')
|
||||
|
||||
self.streaming = streaming
|
||||
self.adding_headers = adding_headers or {}
|
||||
self.forcing_headers = forcing_headers or {}
|
||||
self.status = int(status)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue