(daemonMultiaddr=IPFSAPI_MUTLIADDRESS)
Ensure that the IPFS daemon is running via HTTP before proceeding
Ensure that the IPFS daemon is running via HTTP before proceeding
Ensure that the IPFS daemon is running via HTTP before proceeding
def check_daemon_is_alive(daemonMultiaddr=IPFSAPI_MUTLIADDRESS):
    """Ensure that the IPFS daemon is running via HTTP before proceeding"""
    client = ipfs_client()

    try:
        # ConnectionError/AttributeError if IPFS daemon not running
        client.id()
        return True

    except ConnectionError as err:
        raise IPFSDaemonNotAvailable(
            f'Daemon is not running at: {daemonMultiaddr}',
        ) from err

    except OSError as err:
        raise IPFSDaemonNotAvailable(
            'IPFS is likely not installed. See https://ipfs.io/docs/install/'
        ) from err

    except Exception as err:
        raise IPFSDaemonNotAvailable(
            'Unknown error in retrieving IPFS daemon status.',
        ) from err
def check_daemon_is_alive ( daemonMultiaddr = IPFSAPI_MUTLIADDRESS ) : client = ipfs_client ( ) try : # ConnectionError/AttributeError if IPFS daemon not running client . id ( ) return True except ConnectionError as err : raise IPFSDaemonNotAvailable ( f'Daemon is not running at: {daemonMultiaddr}' , ) from err except OSError as err : raise IPFSDaemonNotAvailable ( 'IPFS is likely not installed. See https://ipfs.io/docs/install/' ) from err except Exception as err : raise IPFSDaemonNotAvailable ( 'Unknown error in retrieving IPFS daemon status.' , ) from err