From a06e0ee59a7773554ce359ec4fd187aeaa034d93 Mon Sep 17 00:00:00 2001 From: Dave Uczen Date: Tue, 19 Jun 2018 16:33:42 -0600 Subject: [PATCH] Return resp.content instead of json when response_class is binary --- ari/model.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ari/model.py b/ari/model.py index f18ccdc..ddf70c7 100644 --- a/ari/model.py +++ b/ari/model.py @@ -367,6 +367,8 @@ def promote(client, resp, operation_json): return factory(client, resp_json) if resp.status_code == requests.codes.no_content: return None + if response_class == 'binary': + return resp.content log.info("No mapping for %s; returning JSON" % response_class) return resp.json()