-
Notifications
You must be signed in to change notification settings - Fork 15
Description
I copy sample code in readme.md which function at DHCP client, my env is centos7 and python3.8.2,
my code is:
import dhcppython
client = dhcppython.client.DHCPClient(interface="wlp3s0")
lease = client.get_lease(mac_addr="fa:b3:9e:89:86:32", broadcast=True, relay=None, server="255.255.255.255", options_list=None)
why it comes :
Traceback (most recent call last):
File "dhcp_clients.py", line 8, in
client = dhcppython.client.DHCPClient(interface="wlp3s0") # wlp3s0
File "/usr/local/Python3.8/lib/python3.8/site-packages/dhcppython/client.py", line 96, in init
self.writing_sockets = self.get_writing_sockets()
File "/usr/local/Python3.8/lib/python3.8/site-packages/dhcppython/client.py", line 329, in get_writing_sockets
client_sock = self.get_socket(host, port)
File "/usr/local/Python3.8/lib/python3.8/site-packages/dhcppython/client.py", line 320, in get_socket
sock.bind((host, port))
OSError: [Errno 98] Address already in use