(profile)
return None
Return a string containing the error message, or None if there was
        no error.
Return a string containing the error message, or None if there was
        no error.
Return a string containing the error message or None if there was no error .
def attempt_connection(profile):
        """Return a string containing the error message, or None if there was
        no error.
        """
        register_adapter(profile)
        adapter = get_adapter(profile)
        try:
            with adapter.connection_named('debug'):
                adapter.debug_query()
        except Exception as exc:
            return COULD_NOT_CONNECT_MESSAGE.format(
                err=str(exc),
                url=ProfileConfigDocs,
            )

        return None
def attempt_connection ( profile ) : register_adapter ( profile ) adapter = get_adapter ( profile ) try : with adapter . connection_named ( 'debug' ) : adapter . debug_query ( ) except Exception as exc : return COULD_NOT_CONNECT_MESSAGE . format ( err = str ( exc ) , url = ProfileConfigDocs , ) return None