From 89d6e6fe9cda1a9b1a6d8b6279f327a2de1e59d2 Mon Sep 17 00:00:00 2001 From: micafer Date: Mon, 2 Sep 2019 08:55:30 +0200 Subject: [PATCH] Improve log message --- IM/InfrastructureList.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/IM/InfrastructureList.py b/IM/InfrastructureList.py index aa4e675f9..31e1de4b1 100644 --- a/IM/InfrastructureList.py +++ b/IM/InfrastructureList.py @@ -205,7 +205,10 @@ def _get_data_from_db(db_url, inf_id=None, auth=None): InfrastructureList.logger.exception( "ERROR reading infrastructure from database, ignoring it!.") else: - InfrastructureList.logger.warn("No data in database!.") + msg = "" + if inf_id: + msg = " for inf ID: %s" % inf_id + InfrastructureList.logger.warn("No data in database%s!." % msg) db.close() return inf_list