aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdi Feschiyan <edi.feschiyan@konsulko.com>2020-09-13 12:36:36 +0300
committerScott Murray <scott.murray@konsulko.com>2020-10-01 19:46:59 -0400
commit8a32ec3e68e699172b724a8f8f13a227af97fe9c (patch)
tree55073f1f7218253668290e0e914a8c674c730cbe
parentb75deb70cee2627ef87a75bffa89688f6e7c663b (diff)
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 <edi.feschiyan@konsulko.com> Change-Id: I198d7be7ea68d056b8269e20d9ce067016d7975b
-rw-r--r--pyagl/services/base.py2
1 files changed, 1 insertions, 1 deletions
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: