summaryrefslogtreecommitdiff
path: root/python/vyos/ioctl.py
diff options
context:
space:
mode:
authorThomas Mangin <thomas.mangin@exa.net.uk>2020-04-08 16:39:43 +0100
committerThomas Mangin <thomas.mangin@exa.net.uk>2020-04-08 17:47:40 +0100
commita5d537d2ab3eadc2922a443de28ddd9b20dbb722 (patch)
treef17f69053452a48e73cabe64f1112500696ff0b1 /python/vyos/ioctl.py
parent3d65f12e38f721ae37b65e058f0c59a24d6a6886 (diff)
downloadvyos-1x-a5d537d2ab3eadc2922a443de28ddd9b20dbb722.tar.gz
vyos-1x-a5d537d2ab3eadc2922a443de28ddd9b20dbb722.zip
import: T2242: remove all import *
Diffstat (limited to 'python/vyos/ioctl.py')
-rw-r--r--python/vyos/ioctl.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/python/vyos/ioctl.py b/python/vyos/ioctl.py
index e57d261e4..cfa75aac6 100644
--- a/python/vyos/ioctl.py
+++ b/python/vyos/ioctl.py
@@ -13,9 +13,11 @@
# You should have received a copy of the GNU Lesser General Public
# License along with this library. If not, see <http://www.gnu.org/licenses/>.
+import sys
import os
-import fcntl, struct, sys
-from socket import *
+import socket
+import fcntl
+import struct
SIOCGIFFLAGS = 0x8913
@@ -28,7 +30,7 @@ def get_terminal_size():
def get_interface_flags(intf):
""" Pull the SIOCGIFFLAGS """
nullif = '\0'*256
- sock = socket(AF_INET, SOCK_DGRAM)
+ sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
raw = fcntl.ioctl(sock.fileno(), SIOCGIFFLAGS, intf + nullif)
flags, = struct.unpack('H', raw[16:18])
return flags