Skip to content

Commit

Permalink
Improve log message
Browse files Browse the repository at this point in the history
  • Loading branch information
micafer committed Sep 2, 2019
1 parent b5aaa65 commit 89d6e6f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion IM/InfrastructureList.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 89d6e6f

Please sign in to comment.