diff options
| author | Christian Breunig <christian@breunig.cc> | 2026-03-05 20:59:12 +0000 |
|---|---|---|
| committer | Christian Breunig <christian@breunig.cc> | 2026-03-05 20:59:12 +0000 |
| commit | dda6740789f80649a1628653146ba4369bbed00a (patch) | |
| tree | 12cc49dacf057455b1d728ccdac2b6ce6028642d | |
| parent | 7c520f8ec786f6cff411188498822eab00e69afd (diff) | |
| download | vyos-1x-dda6740789f80649a1628653146ba4369bbed00a.tar.gz vyos-1x-dda6740789f80649a1628653146ba4369bbed00a.zip | |
template: T8347: for netifaces set "pylint: disable = no-name-in-module"
As the python netifaces module is written in C - we can not inspect any import
line as the linter does not see it. Disable the warnings here.
| -rwxr-xr-x | python/vyos/template.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/python/vyos/template.py b/python/vyos/template.py index 596f9e8c5..2a783bc74 100755 --- a/python/vyos/template.py +++ b/python/vyos/template.py @@ -274,9 +274,9 @@ def netmask_from_ipv4(address): Example: - 172.18.201.10 -> 255.255.255.128 """ - from netifaces import interfaces - from netifaces import ifaddresses - from netifaces import AF_INET + from netifaces import interfaces # pylint: disable = no-name-in-module + from netifaces import ifaddresses # pylint: disable = no-name-in-module + from socket import AF_INET for interface in interfaces(): tmp = ifaddresses(interface) if AF_INET in tmp: |
