Skip to content

Commit 9c1e0ee

Browse files
committed
Fixed logic error in if-clause
1 parent 115a118 commit 9c1e0ee

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

check_mongodb_dbsize.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def query_db(args, creds: dict):
9191
cmd = [args.mongoloc, f'{ creds["hostname"] }:{ creds["port"] }/{ args.db }',
9292
"--quiet", "--eval", "JSON.stringify(db.stats())"]
9393

94-
if creds["user"] != "" and creds["user"] != "":
94+
if creds["user"] != "" and creds["pw"] != "":
9595
# Append parameters for authentification
9696
cmd.append('-u')
9797
cmd.append(creds["user"])

check_mongodb_stats.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def query_db(args, creds: dict):
6363
cmd = [args.mongoloc, f'{ creds["hostname"] }:{ creds["port"] }',
6464
"--quiet", "--eval", "JSON.stringify(db.serverStatus())"]
6565

66-
if creds["user"] != "" and creds["user"] != "":
66+
if creds["user"] != "" and creds["pw"] != "":
6767
# Append parameters for authentification
6868
cmd.append('-u')
6969
cmd.append(creds["user"])

0 commit comments

Comments
 (0)