def _db_connect(): try: DB.connect() except OperationalError: LOGGER.exception("Error occured while connecting to database. %s", format_exc()) abort(503, "DB is not running")
def _db_connect(): DB.connect()