summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdi Feschiyan <edi.feschiyan@konsulko.com>2020-09-13 12:36:36 +0300
committerEdi Feschiyan <edi.feschiyan@konsulko.com>2020-09-17 10:06:31 +0300
commit41d46f8ee481cac153ce2d1b0667a13e3a50c239 (patch)
treed750627e28c2036997ecbe5862f507320a13e64e
parentb2c9569e6c841d79f06f029a84dbc44de29f1875 (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: I69b15127ca386148687d83b3a231c3aa53e789b7
-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: