def science_object_get(self, pid, path):
        """First try the MN set in the session.

        Then try to resolve via the CN set in the session.

        """
        mn_client = d1_cli.impl.client.CLIMNClient(
            **self._mn_client_connect_params_from_session()
        )
        try:
            response = mn_client.get(pid)
        except d1_common.types.exceptions.DataONEException:
            pass
        else:
            self._output(response, path)
            return

        cn_client = d1_cli.impl.client.CLICNClient(
            **self._cn_client_connect_params_from_session()
        )
        object_location_list_pyxb = cn_client.resolve(pid)
        for location in object_location_list_pyxb.objectLocation:
            try:
                params = self._mn_client_connect_params_from_session()
                params["base_url"] = location.baseURL
                mn_client = d1_cli.impl.client.CLIMNClient(**params)
                response = mn_client.get(pid)
            except d1_common.types.exceptions.DataONEException:
                pass
            else:
                self._output(response, path)
                return

        raise d1_cli.impl.exceptions.CLIError("Could not find object: {}".format(pid))
def science_object_get ( self , pid , path ) : mn_client = d1_cli . impl . client . CLIMNClient ( ** self . _mn_client_connect_params_from_session ( ) ) try : response = mn_client . get ( pid ) except d1_common . types . exceptions . DataONEException : pass else : self . _output ( response , path ) return cn_client = d1_cli . impl . client . CLICNClient ( ** self . _cn_client_connect_params_from_session ( ) ) object_location_list_pyxb = cn_client . resolve ( pid ) for location in object_location_list_pyxb . objectLocation : try : params = self . _mn_client_connect_params_from_session ( ) params [ "base_url" ] = location . baseURL mn_client = d1_cli . impl . client . CLIMNClient ( ** params ) response = mn_client . get ( pid ) except d1_common . types . exceptions . DataONEException : pass else : self . _output ( response , path ) return raise d1_cli . impl . exceptions . CLIError ( "Could not find object: {}" . format ( pid ) )
First try the MN set in the session.

        Then try to resolve via the CN set in the session.