Add defensive check for unknown Error Type. If it does happen, an exception will be thrown, instead of using the previous site's results.

pull/350/head
Christopher K. Hoadley 5 years ago
parent 2a8f83924d
commit bbb44d7ef9

@ -404,6 +404,10 @@ def sherlock(username, site_data, verbose=False, tor=False, unique_tor=False,
if not print_found_only:
print_not_found(social_network, response_time, verbose, color)
result = QueryResult(QueryStatus.AVAILABLE)
else:
#It should be impossible to ever get here...
raise ValueError(f"Unknown Error Type '{error_type}' for "
f"site '{social_network}'")
# Save status of request
results_site['status'] = result

Loading…
Cancel
Save