grpc: updated client edit_node to have source as last parameter to be consistent with source placement on all other functions

This commit is contained in:
Blake Harnden 2020-06-30 09:32:56 -07:00
parent aef3fe8d50
commit 69721dc129
2 changed files with 3 additions and 3 deletions

View file

@ -502,8 +502,8 @@ class CoreGrpcClient:
node_id: int,
position: core_pb2.Position = None,
icon: str = None,
source: str = None,
geo: core_pb2.Geo = None,
source: str = None,
) -> core_pb2.EditNodeResponse:
"""
Edit a node, currently only changes position.
@ -512,8 +512,8 @@ class CoreGrpcClient:
:param node_id: node id
:param position: position to set node to
:param icon: path to icon for gui to use for node
:param source: application source
:param geo: lon,lat,alt location for node
:param source: application source
:return: response with result of success or failure
:raises grpc.RpcError: when session or node doesn't exist
"""

View file

@ -221,7 +221,7 @@ def edit_node(args: Namespace) -> None:
geo = Geo(lon=lon, lat=lat, alt=alt)
core = CoreGrpcClient()
with core.context_connect():
response = core.edit_node(session_id, args.id, pos, args.icon, geo=geo)
response = core.edit_node(session_id, args.id, pos, args.icon, geo)
if args.json:
json = MessageToJson(response, preserving_proto_field_name=True)
print(json)