app.py: Handle exception thrown when recursion limit is exceeded

Because the RecursionError exception was introduced in Python 3.5, until we
drop support for for Python 3.4, we must use RuntimeError.
1 file changed