summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2026-03-05 20:59:12 +0000
committerChristian Breunig <christian@breunig.cc>2026-03-05 20:59:12 +0000
commitdda6740789f80649a1628653146ba4369bbed00a (patch)
tree12cc49dacf057455b1d728ccdac2b6ce6028642d /python
parent7c520f8ec786f6cff411188498822eab00e69afd (diff)
downloadvyos-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.
Diffstat (limited to 'python')
-rwxr-xr-xpython/vyos/template.py6
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: