fix: [URLHaus] Do not store responses if the URL is invalid

pull/664/head
Raphaël Vinot 2023-04-13 16:17:58 +02:00
parent 2dc068a63f
commit 6754400e25
1 changed files with 1 additions and 1 deletions

View File

@ -79,7 +79,7 @@ class URLhaus():
url_information = self.__url_result(url) url_information = self.__url_result(url)
if (not url_information if (not url_information
or ('query_status' in url_information or ('query_status' in url_information
and url_information['query_status'] == 'no_results')): and url_information['query_status'] in ['no_results', 'invalid_url'])):
try: try:
url_storage_dir.rmdir() url_storage_dir.rmdir()
except OSError: except OSError: