Commit b3099f7
committed
Fix error in ifquery -c -o json <tunnel interface>
In ifupdown/iface.py, class ifaceJsonEncoderWithStatus(json.JSONEncoder),
in the for-loop, it fails for the IPNetwork objects (keys tunnel-endpoint
and tunnel-remote) since they are not of type string. Converting the
value(s) to string in the loop resolved it.
```
$ ifquery -c -o json gre1
error: main exception: 'IPNetwork' object has no attribute 'config'
```
Tested with a GRE tunnel, first reported by another user on the Proxmox
forum
https://forum.proxmox.com/threads/sdn-tunnel-status-problem.160608/
and reported to the Proxmox bug tracker
https://bugzilla.proxmox.com/show_bug.cgi?id=6078
Signed-off-by: Thomas Kupper <thomas.kupper@gmail.com>1 parent d1c8309 commit b3099f7
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
320 | 320 | | |
321 | 321 | | |
322 | 322 | | |
323 | | - | |
| 323 | + | |
324 | 324 | | |
325 | 325 | | |
326 | 326 | | |
| |||
0 commit comments