From 9811b4417970d6f37e6ab7f30ab34dd61f9654af Mon Sep 17 00:00:00 2001 From: Jorrit Schaap <schaap@astron.nl> Date: Thu, 8 Jun 2017 10:10:17 +0000 Subject: [PATCH] Task #10898: also always call plain onObservationStatusChanged --- SAS/OTDB_Services/OTDBBusListener.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/SAS/OTDB_Services/OTDBBusListener.py b/SAS/OTDB_Services/OTDBBusListener.py index bd2bf4367a4..99ef88fcc33 100644 --- a/SAS/OTDB_Services/OTDBBusListener.py +++ b/SAS/OTDB_Services/OTDBBusListener.py @@ -100,6 +100,14 @@ class OTDBBusListener(AbstractBusListener): else: logger.info("OTDBBusListener.handleMessage - handled unknown state: %s", msg.content['state']) + # apart from calling the above methods for known predefined states, + # also always call plain onObservationStatusChanged + # so subclasses can act on any status in this generic method. + self.onObservationStatusChanged(treeId, msg.content['state'], modificationTime) + + def onObservationStatusChanged(self, treeId, new_status, modificationTime): + pass + def onObservationDescribed(self, treeId, modificationTime): pass -- GitLab