From b993fadedb91f0439decfd889cd881803d52d909 Mon Sep 17 00:00:00 2001 From: Blake Harnden <32446120+bharnden@users.noreply.github.com> Date: Fri, 13 Dec 2019 11:24:35 -0800 Subject: [PATCH] removed grpc check for getting a node service file, it will return the default value when not currently set --- daemon/core/api/grpc/server.py | 7 ------- daemon/core/services/coreservices.py | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/daemon/core/api/grpc/server.py b/daemon/core/api/grpc/server.py index 4ee32751..27b069f0 100644 --- a/daemon/core/api/grpc/server.py +++ b/daemon/core/api/grpc/server.py @@ -1158,13 +1158,6 @@ class CoreGrpcServer(core_pb2_grpc.CoreApiServicer): logging.debug("get node service file: %s", request) session = self.get_session(request.session_id, context) node = self.get_node(session, request.node_id, context) - service = None - for current_service in node.services: - if current_service.name == request.service: - service = current_service - break - if not service: - context.abort(grpc.StatusCode.NOT_FOUND, "service not found") file_data = session.services.get_service_file( node, request.service, request.file ) diff --git a/daemon/core/services/coreservices.py b/daemon/core/services/coreservices.py index 361061be..b51eb715 100644 --- a/daemon/core/services/coreservices.py +++ b/daemon/core/services/coreservices.py @@ -396,7 +396,7 @@ class CoreServices: """ Add services to a node. - :param core.coreobj.PyCoreNode node: node to add services to + :param core.nodes.base.CoreNode node: node to add services to :param str node_type: node type to add services to :param list[str] services: names of services to add to node :return: nothing