From 9d6c447ac929501a26d5cf220ece6f773279ee66 Mon Sep 17 00:00:00 2001 From: Benajmyn Love Date: Tue, 20 Feb 2018 09:07:35 +1100 Subject: [PATCH] Testing --- main.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index 36b6a4e..f7725cd 100644 --- a/main.py +++ b/main.py @@ -7,10 +7,12 @@ from pprint import pprint tmpips = [] #NOTE Need to reset this variable between runs ips = [] ipdict = {} +currValue = "" class threadedLookup(threading.Thread): - def run(self, ip): - lookup(ip) + def run(self): + global currValue + lookup(currValue) def openFile(filename): try: @@ -53,7 +55,8 @@ for x in tmpips: for value in ips: if "." in value: #lookup(value) - lookupThread = threadedLookup(name = "lookup" + value, value) + currValue = value + lookupThread = threadedLookup(name = "lookup" + value) lookupThread.start() #pprint(ipdict)