From a5d537d2ab3eadc2922a443de28ddd9b20dbb722 Mon Sep 17 00:00:00 2001 From: Thomas Mangin Date: Wed, 8 Apr 2020 16:39:43 +0100 Subject: import: T2242: remove all import * --- python/vyos/ioctl.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'python/vyos/ioctl.py') 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 . +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 -- cgit v1.2.3