From 8a32ec3e68e699172b724a8f8f13a227af97fe9c Mon Sep 17 00:00:00 2001 From: Edi Feschiyan Date: Sun, 13 Sep 2020 12:36:36 +0300 Subject: Fix AGLBaseService.afbresponse() for EVENT data afbresponse() in base.py does wrong assignment at the end which effectively makes it work only for responses and discards EVENT data because there is no 'response' key in the json emitted for the event Bug-AGL: SPEC-3585 Signed-off-by: Edi Feschiyan Change-Id: I198d7be7ea68d056b8269e20d9ce067016d7975b --- pyagl/services/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyagl/services/base.py b/pyagl/services/base.py index a7dd7aa..d25f222 100644 --- a/pyagl/services/base.py +++ b/pyagl/services/base.py @@ -88,6 +88,7 @@ class AFBResponse: self.msgid = int(data[1]) self.status = data[2]['request'].get('status') self.info = data[2]['request'].get('info') + self.data = data[2].get('response') elif self.type == AFBT.EVENT: self.api = data[1] @@ -99,7 +100,6 @@ class AFBResponse: self.status = data[2]['request'].get('status') self.info = data[2]['request'].get('info') - self.data = data[2].get('response') def __str__(self): # for debugging purposes if self.type == AFBT.EVENT: -- cgit 1.2.3-korg