Fix generator.py:download_to_file

When some script which is using generator.py module (e.g. generate-publicdns.py) is run for the
first time, the file is missing and unhandled exception is thrown
pull/157/head
Filip Suster 2020-08-03 14:36:12 +02:00
parent 4636dc5640
commit 9557844065
1 changed files with 1 additions and 1 deletions

View File

@ -21,7 +21,7 @@ def download_to_file(url, file):
if(url_datetime > file_datetime):
actual_download_to_file(url, file, user_agent)
except KeyError as ex:
except (KeyError, FileNotFoundError) as ex:
logging.warning(str(ex))
actual_download_to_file(url, file, user_agent)