You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Device-only CSV inventory crashes during optional flags check #21
On current master (f15c05543241e5faa482d0fae0c2244d456091b7), a CSV inventory containing only the mandatory device column crashes while parsing its first row.
Actual: IndexError: list index out of range at if header_list[-1] == 'flags':.
Expected: ['router_a', 'router_b'], with empty attribute tuples. The parser treats device as the mandatory first column and flags as optional, and constructs a valid zero-field namedtuple after removing the device column. It then indexes the now-empty header list while checking for optional flags.
Guarding that optional-header check would allow minimal inventories without changing ordinary attribute or variable-length flags parsing. Dedicated regressions reproduce the failure for plain and commented/whitespace-padded inventories; header-only, vendor, and flags controls already pass.
Opened #22. The optional flags-header check now handles an empty attribute list, allowing inventories with just the mandatory device column.
Both affected regressions fail on current master, and the fix passes all 24 inventory tests. Controls cover header-only input, normal attributes, and variable-length flags. Formatting checks pass for the new test and changed source line, with whitespace checks passing. No live device integration was run locally.
Activity
vinsymoyya commentedon Nov 14, 2026
Opened #22. The optional flags-header check now handles an empty attribute list, allowing inventories with just the mandatory device column.
Both affected regressions fail on current master, and the fix passes all 24 inventory tests. Controls cover header-only input, normal attributes, and variable-length flags. Formatting checks pass for the new test and changed source line, with whitespace checks passing. No live device integration was run locally.