Mercurial > code > home > repos > homeauto
diff service/reasoning/reasoning.py @ 760:3c18b4b3b72c
more py3 fixes
Ignore-this: f212b4a5edf8e599e9efd70bc65e7651
author | drewp@bigasterisk.com |
---|---|
date | Fri, 14 Feb 2020 00:33:31 -0800 |
parents | f3f667769aef |
children | c8562ace4917 |
line wrap: on
line diff
--- a/service/reasoning/reasoning.py Fri Feb 14 00:33:14 2020 -0800 +++ b/service/reasoning/reasoning.py Fri Feb 14 00:33:31 2020 -0800 @@ -195,8 +195,11 @@ """ try: log.info('POST to oneShot, headers=%s', self.request.headers) + ct = self.request.headers.get( + 'Content-Type', + self.request.headers.get('content-type', '')) dt = self.settings.reasoning.inputGraph.addOneShotFromString( - self.request.body, self.request.headers['content-type']) + self.request.body, ct) self.set_header('x-graph-ms', str(1000 * dt)) except Exception as e: traceback.print_exc()