Commits

Jason R. Coombs  committed 6d74082

Use float division

  • Participants
  • Parent commits 78f9ac2

Comments (0)

Files changed (1)

File jaraco/net/inet.py

 Copyright © 2004-2011 Jason R. Coombs
 """
 
+from __future__ import division
+
 import threading
 import socket
 import sys
 	for tester in testers:
 		log.debug('starting tester')
 		tester.start()
-		time.sleep(1.0/frequency)
+		time.sleep(1/frequency)
 		
 class PortListener(threading.Thread):
 	def __init__(self, port):
 	def __init__(self):
 		self.ranges = [range(1, 1024)]
 
-	def Listen(self):
+	def listen(self):
 		ports = reduce(operator.add, self.ranges)
 		ports.sort()
 		self.threads = map(PortListener, ports)
-		map(lambda t: t.start(), self.threads)
+		[t.start for t in self.threads]
 
 def ping_host(host):
 	try: