Check the bottle app for catchall.

def _catchall_enabled(app):
    """Check the bottle app for catchall."""
    while hasattr(app, 'app'):
        if isinstance(app, bottle.Bottle):
            break
        app = app.app
    if hasattr(app, 'catchall'):
        return app.catchall
    else:
        return bottle.default_app().catchall