Change security_group_agent python side in line with default

security group rules change in 4.2
This commit is contained in:
Frank.Zhang 2013-10-08 11:08:18 -07:00
parent d31dcdfd92
commit 30a680efc5
1 changed files with 4 additions and 1 deletions

View File

@ -77,7 +77,10 @@ class Request(object):
def from_cherrypy_request(creq):
req = Request()
req.headers = copy.copy(creq.headers)
req.body = creq.body.fp.read() if creq.body else None
if hasattr(creq.body, 'fp'):
req.body = creq.body.fp.read() if creq.body else None
else:
req.body = creq.body.read() if creq.body else None
req.method = copy.copy(creq.method)
req.query_string = copy.copy(creq.query_string) if creq.query_string else None
return req