diff options
author | John Estabrook <jestabro@vyos.io> | 2022-10-24 14:16:21 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-24 14:16:21 -0500 |
commit | ec82d60828500a56b6fe8357970bf839053ac0af (patch) | |
tree | 4e2a042b940e0dc55f9e74b04aba7e8f4bda7d16 /src/op_mode/route.py | |
parent | f157aea8c7dddd159c9daecc528250370d560db2 (diff) | |
parent | 1c05f8b09bf5727a6e0c0b124f77684635dcf9a8 (diff) | |
download | vyos-1x-ec82d60828500a56b6fe8357970bf839053ac0af.tar.gz vyos-1x-ec82d60828500a56b6fe8357970bf839053ac0af.zip |
Merge pull request #1614 from jestabro/op-mode-route-output
route: T4772: return list of dicts in 'raw' output
Diffstat (limited to 'src/op_mode/route.py')
-rwxr-xr-x | src/op_mode/route.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/op_mode/route.py b/src/op_mode/route.py index e1eee5bbf..d11b00ba0 100755 --- a/src/op_mode/route.py +++ b/src/op_mode/route.py @@ -83,7 +83,12 @@ def show(raw: bool, if raw: from json import loads - return loads(output) + d = loads(output) + collect = [] + for k,_ in d.items(): + for l in d[k]: + collect.append(l) + return collect else: return output |