From 0499ca5b47222d2d854a9e8b7afce98ce7d747be Mon Sep 17 00:00:00 2001 From: Joshua Boniface Date: Sun, 30 Sep 2018 19:08:49 -0400 Subject: [PATCH] Remove all debug printing --- router-daemon/pvcrd/DHCPServer.py | 9 --------- router-daemon/pvcrd/VXNetworkInstance.py | 1 - 2 files changed, 10 deletions(-) diff --git a/router-daemon/pvcrd/DHCPServer.py b/router-daemon/pvcrd/DHCPServer.py index 716bdd80..8e2ddb0b 100644 --- a/router-daemon/pvcrd/DHCPServer.py +++ b/router-daemon/pvcrd/DHCPServer.py @@ -236,7 +236,6 @@ class ReadBootProtocolPacket(object): setattr(self, 'option_{}'.format(option), option_data) def __getitem__(self, key): - print(key, dir(self)) return getattr(self, key, None) def __contains__(self, key): @@ -293,7 +292,6 @@ if __name__ == '__main__': reads = select.select([s1], [], [], 1)[0] for s in reads: packet = ReadBootProtocolPacket(*s.recvfrom(4096)) - print(packet) def get_host_ip_addresses(): @@ -355,7 +353,6 @@ class WriteBootProtocolPacket(object): for option in self.options: value = self.get_option(option) - #print(option, value) if value is None: continue result += bytes([option, len(value)]) + value @@ -768,14 +765,12 @@ class DHCPServer(object): reads = select.select([self.socket], [], [], timeout)[0] except ValueError as e: # ValueError: file descriptor cannot be a negative integer (-1) - print(e) return for socket in reads: try: packet = ReadBootProtocolPacket(*socket.recvfrom(4096)) except OSError as e: # OSError: [WinError 10038] An operation was attempted on something that is not a socket - print(e) pass else: self.received(packet) @@ -813,11 +808,9 @@ class DHCPServer(object): for host in known_hosts: if self.is_valid_client_address(host.ip): ip = host.ip - print('known ip:', ip) if ip is None and self.is_valid_client_address(requested_ip_address): # 2. choose valid requested ip address ip = requested_ip_address - print('valid ip:', ip) if ip is None: # 3. choose new, free ip address chosen = False @@ -831,9 +824,7 @@ class DHCPServer(object): network_hosts.sort(key = lambda host: host.last_used) ip = network_hosts[0].ip assert self.is_valid_client_address(ip) - print('new ip:', ip) 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())) return ip diff --git a/router-daemon/pvcrd/VXNetworkInstance.py b/router-daemon/pvcrd/VXNetworkInstance.py index f8794fee..7323f2f1 100644 --- a/router-daemon/pvcrd/VXNetworkInstance.py +++ b/router-daemon/pvcrd/VXNetworkInstance.py @@ -192,7 +192,6 @@ class VXNetworkInstance(): start_addr=self.dhcp_start, end_addr=self.dhcp_end ) - dhcp_configuration.debug = print self.dhcp_server = DHCPServer.DHCPServer(dhcp_configuration) self.dhcp_server.start()