fix bug list nodes

This commit is contained in:
Federico Luzzi 2024-06-10 15:45:04 -03:00
parent e09481e6f1
commit 3365acb473
2 changed files with 6 additions and 2 deletions

View File

@ -1,2 +1,2 @@
__version__ = "4.0.2" __version__ = "4.0.3"

View File

@ -484,7 +484,11 @@ class connapp:
return actions.get(args.command)(args) return actions.get(args.command)(args)
def _ls(self, args): def _ls(self, args):
items = getattr(self, args.data) if args.data == "nodes":
attribute = "nodes_list"
else:
attribute = args.data
items = getattr(self, attribute)
if args.filter: if args.filter:
items = [ item for item in items if re.search(args.filter[0], item)] items = [ item for item in items if re.search(args.filter[0], item)]
if args.format and args.data == "nodes": if args.format and args.data == "nodes":