From 487db5f7c9c2b03953d4600e2cc3f54fa0150030 Mon Sep 17 00:00:00 2001 From: grz0 Date: Sat, 22 Aug 2015 14:09:58 +0200 Subject: [PATCH] Fix bug in JSONTokenApi plugin `Response#json` is a method, not a property, in the requests library. [directxman12: removed unnecessary calls to str] --- websockify/token_plugins.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/websockify/token_plugins.py b/websockify/token_plugins.py index b75ef00..3a1195f 100644 --- a/websockify/token_plugins.py +++ b/websockify/token_plugins.py @@ -79,4 +79,5 @@ class JSONTokenApi(BaseTokenAPI): # should go def process_result(self, resp): - return (resp.json['host'], resp.json['port']) + resp_json = resp.json() + return (resp_json['host'], resp_json['port'])