ifstate identify failes when there are no links #141
Contributor
```
ifstatecli[84]: IfState 2.2.1
ifstate-identif[84]: ifstate-identify[84] IfState 2.2.1
ifstate-identif[84]: ifstate-identify[84] features brport devicetree ethtool link sysctl tc wireguard
ifstatecli[84]: features brport devicetree ethtool link sysctl tc wireguard
ifstatecli[84]: Traceback (most recent call last):
ifstatecli[84]: File "/nix/store/1kfsdm5dbsgw9j01vp87mx8bx46b7yhh-ifstate-2.2.1/bin/.ifstatecli-wrapped", line 9, in <module>
ifstatecli[84]: sys.exit(main())
ifstatecli[84]: ~~~~^^
ifstatecli[84]: File "/nix/store/1kfsdm5dbsgw9j01vp87mx8bx46b7yhh-ifstate-2.2.1/lib/python3.13/site-packages/ifstate/ifstate.py", line 194, in main
ifstatecli[84]: print(yaml.dump(ifs.identify()))
ifstatecli[84]: ~~~~~~~~~~~~^^
ifstatecli[84]: File "/nix/store/1kfsdm5dbsgw9j01vp87mx8bx46b7yhh-ifstate-2.2.1/lib/python3.13/site-packages/libifstate/__init__.py", line 659, in identify
ifstatecli[84]: return {**root_config}
ifstatecli[84]: ^^^^^^^^^^^^^^^
ifstatecli[84]: TypeError: 'NoneType' object is not a mapping
systemd[1]: ifstate-initrd.service: Control process exited, code=exited, status=1/FAILURE
systemd[1]: ifstate-initrd.service: Failed with result 'exit-code'.
systemd[1]: Failed to start IfState initrd.
```
bug
label
ifstate: fix identifies fails if root netns has no links (closes #141)
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
more info
question
TBD
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
liske/ifstate#141
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?