Print messasge in a better place

This commit is contained in:
Joshua Boniface 2018-09-30 16:05:34 -04:00
parent cb3fb84b8d
commit c360a91d9a
1 changed files with 1 additions and 1 deletions

View File

@ -476,6 +476,7 @@ class Transaction(object):
offer.dhcp_message_type = 'DHCPOFFER'
offer.client_identifier = mac
self.server.broadcast(offer)
ansiiprint.echo('DHCP server allocated {} to {} (hostname "{}")'.format(ip, mac, discovery.host_name), '', 'i')
def received_dhcp_request(self, request):
if self.is_done(): return
@ -834,7 +835,6 @@ class DHCPServer(object):
if not any([host.ip == ip for host in known_hosts]):
print('add', mac_address, ip, packet.host_name)
self.hosts.replace(Host(mac_address, ip, packet.host_name or '', time.time()))
ansiiprint.echo('DHCP client allocated - {} {} {}'.format(mac_address, ip, packet.host_name), '', 'i')
return ip
@property