From 13a56f1f575b88732810aca14cfc2b108f57e24a Mon Sep 17 00:00:00 2001 From: Martin Glauer Date: Thu, 20 Jun 2019 19:25:11 +0200 Subject: [PATCH] Fix range error in engine.py And a trailing whitespace --- oedialect/engine.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/oedialect/engine.py b/oedialect/engine.py index 3183ea1..f454fc6 100644 --- a/oedialect/engine.py +++ b/oedialect/engine.py @@ -189,7 +189,7 @@ def post(self, suffix, query, cursor_id=None, requires_connection_id=False): if 'info_cache' in query: del query['info_cache'] - + data = {'query': query} if requires_connection_id or cursor_id: @@ -235,7 +235,7 @@ def post(self, suffix, query, cursor_id=None, requires_connection_id=False): def process_returntype(response, content=None): if content is None: content = {} - if 400 < response.status_code < 500: + if 400 <= response.status_code < 500: raise ConnectionException('HTTP %d (%s)'%(response.status_code,response.reason)) elif 500 <= response.status_code < 600: raise ConnectionException('Server side error: ' + content.get('reason', 'No reason returned'))