diff options
Diffstat (limited to 'gn3')
-rw-r--r-- | gn3/api/async_commands.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/gn3/api/async_commands.py b/gn3/api/async_commands.py index f8400c8..81c3c44 100644 --- a/gn3/api/async_commands.py +++ b/gn3/api/async_commands.py @@ -8,14 +8,11 @@ async_commands = Blueprint("async_commands", __name__) @async_commands.route("/state/<command_id>") def command_state(command_id): - with redis.Redis() as rconn: + with redis.Redis(decode_responses=True) as rconn: state = rconn.hgetall(name=command_id) if not state: return jsonify( status=404, error="The command id provided does not exist.") - state = { - key.decode("utf-8"): val.decode("utf8") - for key,val in state.items() - } + state = {key: val for key,val in state.items()} return jsonify(state) |