Page MenuHomeVyOS Platform

op-mode: lldp: show lldp neighbors - AttributeError: 'str' object has no attribute 'items'
Closed, ResolvedPublicBUG

Description

When running 'show lldp neighbors' on current it will fail with the following trace as parse_data is expecting a dict within an array (don't see why the array is necessary) but just a bare dict is provided so the key is attempted to be iterated.

Traceback (most recent call last):
  File "./lldp_op.py", line 122, in <module>
    config_text = tmpl.render(parse_data(neighbors))
  File "./lldp_op.py", line 51, in parse_data
    for local_if, values in tmp.items():
AttributeError: 'str' object has no attribute 'items'

PR submitted to fix this.

Details

Difficulty level
Easy (less than an hour)
Version
1.3 Current
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)