src/pds_doi_service/core/outputs/doi_validator.py
def _check_node_id(self, doi: Doi):
        """
        Checks if the provided Doi object has a valid node ID assigned.

        Parameters
        ----------
        doi : Doi
            The Doi object to check.

        Raises
        ------
        UnknownNodeException
            If the Doi object has an unrecognized node ID assigned, or no
            node ID assigned at all.

        """
        try:
            if not doi.node_id:
                raise UnknownNodeException("Doi object does not have a node ID value assigned.")

            NodeUtil.validate_node_id(doi.node_id)
        except UnknownNodeException as err:
            msg = (
                f"Invalid Node ID for DOI record with identifier {doi.pds_identifier}.\n"
                f"Reason: {str(err)}.\n"
                "Please use the --node option to specify the apporpriate PDS node ID for the transaction."
            )

            raise UnknownNodeException(msg)

        Checks if the provided Doi object has a valid node ID assigned.

        Parameters
        ----------
        doi : Doi
            The Doi object to check.

        Raises
        ------
        UnknownNodeException
            If the Doi object has an unrecognized node ID assigned, or no
            node ID assigned at all.

        
Checks if the provided Doi object has a valid node ID assigned.
Parameters

doi : Doi
The Doi object to check.

Raises

UnknownNodeException
If the Doi object has an unrecognized node ID assigned, or no
node ID assigned at all.
Checks if the provided Doi object has a valid node ID assigned . Parameters doi : Doi The Doi object to check . Raises UnknownNodeException If the Doi object has an unrecognized node ID assigned or no node ID assigned at all .
def _check_node_id(self, doi: Doi):
        try:
            if not doi.node_id:
                raise UnknownNodeException("Doi object does not have a node ID value assigned.")
            NodeUtil.validate_node_id(doi.node_id)
        except UnknownNodeException as err:
            msg = (
                f"Invalid Node ID for DOI record with identifier {doi.pds_identifier}.\n"
                f"Reason: {str(err)}.\n"
                "Please use the --node option to specify the apporpriate PDS node ID for the transaction."
            )
            raise UnknownNodeException(msg)
def _check_node_id ( self , doi : Doi ) : try : if not doi . node_id : raise UnknownNodeException ( "Doi object does not have a node ID value assigned." ) NodeUtil . validate_node_id ( doi . node_id ) except UnknownNodeException as err : msg = ( f"Invalid Node ID for DOI record with identifier {doi.pds_identifier}.\n" f"Reason: {str(err)}.\n" "Please use the --node option to specify the apporpriate PDS node ID for the transaction." ) raise UnknownNodeException ( msg )
Checks if the provided Doi object has a valid node ID assigned.
Checks if the provided Doi object has a valid node ID assigned .
"""
        Checks if the provided Doi object has a valid node ID assigned.

        Parameters
        ----------
        doi : Doi
            The Doi object to check.

        Raises
        ------
        UnknownNodeException
            If the Doi object has an unrecognized node ID assigned, or no
            node ID assigned at all.

        """
self
doi
Doi