This repository was archived by the owner on May 29, 2024. It is now read-only.

Description
The method _resolve_variable is used to resolve a $foo variable within a rule into a pythonic value . The valuea are given in a dictionary. So if the dictionary contains a value for the key "foo" the value will be returned. Otherwise a error is logged if the value can not be found.
The problem with this behavior is that the logging is done regardless on the context in which the function is called. Consider the following rule:
bool($foo) with a empty dictionary. Currently the foo variable would be resolved and the bool method is called with the result. Logging the fact that the variable is missing is senseless here because the bool method is used to check if a value is present. In this case a missing value is an expected case and should not be logged.
An improvement might be to call the method not globally but in context of a specific function. So the bool method may catch the case the the value is missing and silently continue while other functions can log or even raise an exception.