async def start_lbrynet_console(quiet, use_existing_daemon, useauth): if not utils.check_connection(): print("Not connected to internet, unable to start") raise Exception("Not connected to internet, unable to start") if not quiet: print("Starting lbrynet-console...") try: await LBRYAPIClient.get_client().status() d = defer.succeed(False) if not quiet: print("lbrynet-daemon is already running, connecting to it...") except client_exceptions.ClientConnectorError: if not use_existing_daemon: if not quiet: print("Starting lbrynet-daemon...") analytics_manager = analytics.Manager.new_instance() d = start_server_and_listen(useauth, analytics_manager, quiet) else: raise Exception("cannot connect to an existing daemon instance, " "and set to not start a new one") d.addCallback(threaded_terminal, quiet) d.addErrback(log.exception)
def test_internet_connection(): return utils.check_connection()
def test_internet_connection(): return utils.check_connection()
def test_internet_connection(): return utils.check_connection(server='baidu.com')