Skip to content

Commit

Permalink
Fix classname comparison in create_nodeping_check
Browse files Browse the repository at this point in the history
  • Loading branch information
NodePing committed Nov 7, 2024
1 parent d3da125 commit 8d9d028
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions nodeping.py
Original file line number Diff line number Diff line change
Expand Up @@ -458,11 +458,11 @@ def create_nodeping_check(parameters):
customerid = parameters["customerid"]
name = parameters["label"] or parameters["target"]
checktype = parameters["checktype"].upper()
classname = "{}Check".format(checktype.title())
classname = "{}Check".format(checktype)
(_, checkclass) = [
func
for func in inspect.getmembers(nodepingpy.checktypes)
if inspect.isclass(func[1]) and func[0] == classname
if inspect.isclass(func[1]) and func[0].upper() == classname.upper()
][0]

# websocketdata isn't part of the API but is necessary to get the data in
Expand Down Expand Up @@ -520,7 +520,7 @@ def update_nodeping_check(parameters):
if "dep" in oldresult.keys() and oldresult["dep"] == "":
oldresult["dep"] = False

classname = "{}Check".format(checktype.title())
classname = "{}Check".format(checktype)
(_, checkclass) = [
func
for func in inspect.getmembers(nodepingpy.checktypes)
Expand Down

0 comments on commit 8d9d028

Please sign in to comment.