From 80881f3a6b05474fcd5afe7b3ed30cc7e75e4a92 Mon Sep 17 00:00:00 2001 From: Aleksander Sadikov Date: Tue, 1 Mar 2016 01:09:07 +0100 Subject: Improved hints for ancestor/2 and descendant/2. --- prolog/problems/family_relations/ancestor_2/common.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'prolog/problems/family_relations/ancestor_2/common.py') diff --git a/prolog/problems/family_relations/ancestor_2/common.py b/prolog/problems/family_relations/ancestor_2/common.py index d2e4f76..6690e00 100644 --- a/prolog/problems/family_relations/ancestor_2/common.py +++ b/prolog/problems/family_relations/ancestor_2/common.py @@ -29,6 +29,7 @@ hint_type = { 'ancestor_to_oneself': Hint('ancestor_to_oneself'), 'descendant_need_not_be_parent': Hint('descendant_need_not_be_parent'), 'wrong_direction': Hint('wrong_direction'), + 'timeout': Hint('timeout'), } test_cases = [ @@ -105,7 +106,7 @@ def hint(code, aux_code): return [{'id': 'descendant_need_not_be_parent'}] except socket.timeout as ex: - pass + return [{'id': 'timeout'}] finally: if engine_id: -- cgit v1.2.1