deduplicate looked up results
This commit is contained in:
parent
4b67b70a82
commit
11539eda9d
@ -53,21 +53,7 @@ def create_app(test_config=None):
|
||||
session["test"] = test
|
||||
session["results"] = pickle.dumps(results)
|
||||
|
||||
### TESTING
|
||||
build_history(results)
|
||||
print("build_history just ran...")
|
||||
# session["results"] = pickle.dumps(results)
|
||||
# if "history" in session:
|
||||
# print("HISTORY IS IN SESSION")
|
||||
# current_history = pickle.loads(session["history"])
|
||||
# for result in results:
|
||||
# if result not in current_history:
|
||||
# current_history.append(result)
|
||||
# session["history"] = pickle.dumps(current_history)
|
||||
# elif "history" not in session:
|
||||
# print("HISTORY IS NOT IN SESSION")
|
||||
# session["history"] = pickle.dumps(results)
|
||||
### END TESTING
|
||||
if any(results):
|
||||
results_present = True
|
||||
if any(errors):
|
||||
@ -86,6 +72,7 @@ def create_app(test_config=None):
|
||||
|
||||
def build_results(hosts):
|
||||
results = []
|
||||
hosts = list(set(hosts))
|
||||
for host in hosts:
|
||||
result = host_lookup.Lookedup(host)
|
||||
results.append(result)
|
||||
|
Loading…
x
Reference in New Issue
Block a user