Skip to content
This repository has been archived by the owner on Dec 18, 2024. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'boschresearch/fix/autocomplete' into fe…
Browse files Browse the repository at this point in the history
…ature/channel_for_subscription_handler
  • Loading branch information
nayakned committed Jul 15, 2022
2 parents 3fc26d6 + a4bbc9f commit 2713505
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion kuksa_viss_client/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ def get_childtree(self, pathText):
childVssTree = childVssTree[path]
elif 'children' in childVssTree and path in childVssTree['children']:
childVssTree = childVssTree['children'][path]
else:
# This else-branch is reached when one of the path components is invalid
# In that case stop parsing further and return an empty tree
# Autocompletion can't help here.
childVssTree={}
break

if 'children' in childVssTree:
childVssTree = childVssTree['children']
Expand Down Expand Up @@ -88,7 +94,6 @@ def path_completer(self, text, line, begidx, endidx):
if 'children' in child:
self.pathCompletionItems.append(CompletionItem(prefix + key+seperator, "Children of branch "+prefix+key))


return basic_complete(text, line, begidx, endidx, self.pathCompletionItems)

def subscribeCallback(self, path, attr, resp):
Expand Down

0 comments on commit 2713505

Please sign in to comment.