Module: check_mk
Branch: master
Commit: 66b21e09ac953a36dabdf9548e7446ab67190ef5
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=66b21e09ac953a…
Author: Moritz Kiemer <mo(a)mathias-kettner.de>
Date: Thu Apr 4 07:53:38 2019 +0200
mk_mongodb: remove '.database_names()'
The database_names attribute was a method of a client instance
- not of the top level module. Also it is deprecated, and
used to return a list of database names.
Change-Id: I06ce33d9e094fa6e5fa4f794e4a5d95cfb352f3f
---
agents/plugins/mk_mongodb | 5 -----
1 file changed, 5 deletions(-)
diff --git a/agents/plugins/mk_mongodb b/agents/plugins/mk_mongodb
index fc45b9a..473e82b 100755
--- a/agents/plugins/mk_mongodb
+++ b/agents/plugins/mk_mongodb
@@ -36,11 +36,6 @@ def main(): # pylint: disable=too-many-branches,too-many-locals
try:
con = pymongo.MongoClient(host, port,
read_preference=pymongo.ReadPreference.SECONDARY)
- try:
- # pylint: disable=no-member
- con = pymongo.database_names()
- except Exception: # pylint: disable=broad-except
- con = pymongo.MongoClient(None, None,
read_preference=pymongo.ReadPreference.SECONDARY)
# if user and passwd:
# db = con["admin"]