correct handling of filename when not extracted from header

This commit is contained in:
John Jensen 2020-09-25 12:17:44 -03:00
parent 6c082c8fe4
commit 5802e7f1a1

View file

@ -109,7 +109,7 @@ def download_one_zone(url, output_directory):
if status_code == 200:
# Try to get the filename from the header
_,option = cgi.parse_header(download_zone_response.headers['content-disposition'])
filename = option['filename']
filename = option.get('filename')
# If could get a filename from the header, then makeup one like [tld].txt.gz
if not filename: