'Runs the user-supplied progress calculation rule'

def _eval_progress(self, match):

    _locals = {k: safe_float(v) for (k, v) in match.groupdict().items()}
    if ('x' not in _locals):
        _locals['x'] = [safe_float(x) for x in match.groups()]
    try:
        return int(eval(self.progress_expr, {}, _locals))
    except:
        return None
