diff --git a/server.py b/server.py index fac8eb9..786801d 100644 --- a/server.py +++ b/server.py @@ -59,7 +59,37 @@ def execute_code(code, request_obj, environment): 'pow': pow, 'range': range, 'repr': repr, 'reversed': reversed, 'round': round, 'set': set, 'slice': slice, 'sorted': sorted, 'str': str, 'sum': sum, 'super': super, 'tuple': tuple, 'type': type, - 'zip': zip,'Exception': Exception, + 'zip': zip, + 'BaseException': BaseException, + 'Exception': Exception, + 'ArithmeticError': ArithmeticError, + 'AssertionError': AssertionError, + 'AttributeError': AttributeError, + 'EOFError': EOFError, + 'FloatingPointError': FloatingPointError, + 'GeneratorExit': GeneratorExit, + 'ImportError': ImportError, + 'IndexError': IndexError, + 'KeyError': KeyError, + 'KeyboardInterrupt': KeyboardInterrupt, + 'LookupError': LookupError, + 'MemoryError': MemoryError, + 'NameError': NameError, + 'NotImplementedError': NotImplementedError, + 'OSError': OSError, + 'OverflowError': OverflowError, + 'RecursionError': RecursionError, + 'ReferenceError': ReferenceError, + 'RuntimeError': RuntimeError, + 'StopIteration': StopIteration, + 'StopAsyncIteration': StopAsyncIteration, + 'SyntaxError': SyntaxError, + 'SystemError': SystemError, + 'TypeError': TypeError, + 'UnboundLocalError': UnboundLocalError, + 'UnicodeError': UnicodeError, + 'ValueError': ValueError, + 'ZeroDivisionError': ZeroDivisionError }, 'request': request_obj, 'environment': environment,