From 619196373e5242755ecb579fd8deeb6e16cd55bd Mon Sep 17 00:00:00 2001 From: Thomas Forgione Date: Thu, 4 Apr 2019 11:44:41 +0200 Subject: [PATCH] Manage errors from players --- pytron | 2 +- pytron_run/ai_manager/__init__.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pytron b/pytron index 8d27a92..ed3c86a 160000 --- a/pytron +++ b/pytron @@ -1 +1 @@ -Subproject commit 8d27a9293e2ffbb1119b9c3c453aec76be612a50 +Subproject commit ed3c86a2822cd23e4a3cf4b66e4483fdb129cbe1 diff --git a/pytron_run/ai_manager/__init__.py b/pytron_run/ai_manager/__init__.py index 5739040..fc5da96 100644 --- a/pytron_run/ai_manager/__init__.py +++ b/pytron_run/ai_manager/__init__.py @@ -20,7 +20,10 @@ for path in [f for f in modules if isfile(f)]: name = toto.split('/')[-2] # Find the module - module = import_module('.'.join(toto.split('/')[-3:])) + try: + module = import_module('.'.join(toto.split('/')[-3:])) + except: + continue # Find the constructor constructor = getattr(module, 'Ai')