From 58fee826ab5298f7de036bf320bbc109b853eec8 Mon Sep 17 00:00:00 2001 From: anmolbabu Date: Tue, 31 Jan 2017 20:38:55 +0530 Subject: [PATCH] Add null check for sds sync thread which can be optional Signed-off-by: anmolbabu --- tendrl/commons/manager/__init__.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tendrl/commons/manager/__init__.py b/tendrl/commons/manager/__init__.py index b8ca3a1f..0f8b79e8 100644 --- a/tendrl/commons/manager/__init__.py +++ b/tendrl/commons/manager/__init__.py @@ -23,19 +23,21 @@ def __init__( def stop(self): LOG.info("%s stopping" % self.__class__.__name__) self._job_consumer_thread.stop() - self._sds_sync_thread.stop() + if self._sds_sync_thread: + self._sds_sync_thread.stop() self._central_store_thread.stop() def start(self): LOG.info("%s starting" % self.__class__.__name__) self._central_store_thread.start() - self._sds_sync_thread.start() + if self._sds_sync_thread: + self._sds_sync_thread.start() self._job_consumer_thread.start() def join(self): LOG.info("%s joining" % self.__class__.__name__) self._job_consumer_thread.join() - self._sds_sync_thread.join() + if self._sds_sync_thread: + self._sds_sync_thread.join() self._central_store_thread.join() -