From 44aa371e10cd805edea1656c3205201d3379c63f Mon Sep 17 00:00:00 2001 From: Joel Lowery Date: Sun, 12 Mar 2017 18:31:16 -0500 Subject: [PATCH] Print output if any part has an error --- Submission.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Submission.py b/Submission.py index 2dbbeea..68b0600 100644 --- a/Submission.py +++ b/Submission.py @@ -25,9 +25,10 @@ def submit(self): for part_id, _ in enumerate(self.__srcs, 1): try: parts[str(part_id)] = {'output': self.__output(part_id)} - except: + except Exception as e: + print('Error in part {}: {}'.format(part_id, e)) parts[str(part_id)] = {'output': '0'} - + result, response = self.request(parts) response = loads(response.decode('utf-8')) try: