summaryrefslogtreecommitdiff
path: root/python/vyos/ioctl.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-04-09 07:39:12 +0200
committerGitHub <noreply@github.com>2020-04-09 07:39:12 +0200
commitd7c1bab9b99689be5b99a5bdac3999229ea788ab (patch)
treede44f656e9017b8bc0fe97ae9bb61adfc1c7f018 /python/vyos/ioctl.py
parentb102408165037d57453ce4928b93958a54c69dcd (diff)
parenta5d537d2ab3eadc2922a443de28ddd9b20dbb722 (diff)
downloadvyos-1x-d7c1bab9b99689be5b99a5bdac3999229ea788ab.tar.gz
vyos-1x-d7c1bab9b99689be5b99a5bdac3999229ea788ab.zip
Merge pull request #316 from thomas-mangin/T2242
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