From a3b2cc158d528b2ffbde036dece577153a1690e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20MOHIER?= Date: Tue, 17 Dec 2019 09:59:09 +0100 Subject: [PATCH] Allow logs collection to not still exist in the DB --- module/submodules/logs.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/module/submodules/logs.py b/module/submodules/logs.py index f2fa96a3..00e7e4bc 100644 --- a/module/submodules/logs.py +++ b/module/submodules/logs.py @@ -143,9 +143,9 @@ def open(self): if self.logs_collection not in self.db.collection_names(): logger.warning("[mongo-logs] configured logs collection '%s' " "does not exist in the database", self.logs_collection) - else: - self.is_connected = True - logger.info('[mongo-logs] database connection established') + + self.is_connected = True + logger.info('[mongo-logs] database connection established') except Exception as exp: logger.error("[mongo-logs] Exception: %s", str(exp)) logger.debug("[mongo-logs] Exception type: %s", type(exp))