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
we use VLAN devices (there are a lot of them in production) and sadly ifcfg is unable to parse them. I do not need any real information about the VLAN interfaces, but the script should not crash.
Python 3.7.4 (default, Sep 16 2019, 11:45:03)
[GCC 4.9.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import ifcfg
>>> ifcfg.interfaces()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.7/site-packages/ifcfg/__init__.py", line 66, in interfaces
return Parser(ifconfig=ifconfig).interfaces
File "/usr/local/lib/python3.7/site-packages/ifcfg/parser.py", line 30, in __init__
self.parse(self.ifconfig_data)
File "/usr/local/lib/python3.7/site-packages/ifcfg/parser.py", line 70, in parse
self.add_device(cur)
File "/usr/local/lib/python3.7/site-packages/ifcfg/parser.py", line 34, in add_device
raise RuntimeError("Device {} already added".format(device_name))
RuntimeError: Device eth2 already added
Guessing that the issue is that eth2.2 gets matched and added as eth2 which should crash, as it already exists... BUT it's the matching that's the problem. Assuming that . should be allowed in the pattern for interface names.
Hi,
we use VLAN devices (there are a lot of them in production) and sadly
ifcfg
is unable to parse them. I do not need any real information about the VLAN interfaces, but the script should not crash.The text was updated successfully, but these errors were encountered: