minor fix
This commit is contained in:
parent
ecfd5187e1
commit
2c43a8f9da
|
@ -166,7 +166,11 @@ class Model(object):
|
|||
payload = json.dumps(data, default=encoder)
|
||||
else:
|
||||
payload = None
|
||||
conn = self.conn(self.host, port=self.port, context=self.context_http)
|
||||
if self.context_http:
|
||||
conn = self.conn(self.host, port=self.port, context=self.context_http)
|
||||
else:
|
||||
conn = self.conn(self.host, port=self.port)
|
||||
|
||||
conn.request(method, url, body=payload, headers=HEADERS)
|
||||
response = conn.getresponse()
|
||||
res = json.loads(response.read())
|
||||
|
|
Loading…
Reference in New Issue