Housekeeping and migrated prints to logging
This commit is contained in:
@@ -21,54 +21,43 @@ def applyConditions(definition, dictionary, outputs):
|
||||
|
||||
if filter["operator"] == ">=":
|
||||
if int(resolvedvalue or 0) >= int(filtervalue):
|
||||
print(filter["print"])
|
||||
return True, filter
|
||||
|
||||
if filter["operator"] == "<=":
|
||||
if int(resolvedvalue or 0) <= int(filtervalue):
|
||||
print(filter["print"])
|
||||
return True, filter
|
||||
|
||||
if filter["operator"] == "==":
|
||||
if resolvedvalue == filtervalue:
|
||||
print(filter["print"])
|
||||
return True, filter
|
||||
|
||||
if filter["operator"] == "!=":
|
||||
if resolvedvalue != filtervalue:
|
||||
print(filter["print"])
|
||||
return True, filter
|
||||
|
||||
if filter["operator"] == ">":
|
||||
if int(resolvedvalue or 0) > int(filtervalue):
|
||||
print(filter["print"])
|
||||
return True, filter
|
||||
|
||||
if filter["operator"] == "<":
|
||||
if int(resolvedvalue or 0) < int(filtervalue):
|
||||
print(filter["print"])
|
||||
return True, filter
|
||||
|
||||
if filter["operator"] == "in":
|
||||
if filtervalue in dictionary:
|
||||
print(filter["print"])
|
||||
return True, filter
|
||||
|
||||
if filter["operator"] == "is":
|
||||
if resolvedvalue is filtervalue:
|
||||
print(filter["print"])
|
||||
return True, filter
|
||||
|
||||
if filter["operator"] == "is not":
|
||||
if resolvedvalue is not filtervalue:
|
||||
print(filter["print"])
|
||||
return True, filter
|
||||
|
||||
except KeyError:
|
||||
print(f"Value not present in runtime for filtering during {definition.name}")
|
||||
#print(filter)
|
||||
return True, filter
|
||||
#continue
|
||||
|
||||
#except TypeError:
|
||||
# print("TypeError")
|
||||
|
||||
Reference in New Issue
Block a user