From 295ccbbe64a34f99147b53c4ef4b59b4dd2f915d Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Sun, 24 Feb 2019 10:55:52 -0500 Subject: [PATCH] Name the data what it is --- piker/brokers/_util.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/piker/brokers/_util.py b/piker/brokers/_util.py index 8d7a3e7b..73fb3e9f 100644 --- a/piker/brokers/_util.py +++ b/piker/brokers/_util.py @@ -24,11 +24,11 @@ def resproc( if not resp.status_code == 200: raise BrokerError(resp.body) try: - data = resp.json() + json = resp.json() except json.decoder.JSONDecodeError: log.exception(f"Failed to process {resp}:\n{resp.text}") raise BrokerError(resp.text) else: - log.trace(f"Received json contents:\n{colorize_json(data)}") + log.trace(f"Received json contents:\n{colorize_json(json)}") - return data if return_json else resp + return json if return_json else resp