diff --git a/pyknow/agenda.py b/pyknow/agenda.py index d4a09ee..5f4ab24 100644 --- a/pyknow/agenda.py +++ b/pyknow/agenda.py @@ -15,7 +15,7 @@ def __init__(self): def __repr__(self): # pragma: no cover return "\n".join( "{idx}: {rule} {facts}".format(idx=idx, - rule=act.activation.rule.__name__, + rule=getattr(act.activation.rule, '__name__', '[anonymous]'), facts=act.activation.facts) for idx, act in enumerate(self.activations))