aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/download_emails.py6
-rw-r--r--python/parse_emails.py2
2 files changed, 2 insertions, 6 deletions
diff --git a/python/download_emails.py b/python/download_emails.py
index 2a124d2e..1baab124 100644
--- a/python/download_emails.py
+++ b/python/download_emails.py
@@ -16,11 +16,7 @@ def save_emails(update=True):
DATA_DIR = Path(os.getenv("DATA_DIR"))
if update:
- try:
- last_history_id = int((DATA_DIR / ".lastHistoryId").read_text())
- except FileNotFoundError:
- logging.error("can't find .lastHistoryId file")
- sys.exit()
+ last_history_id = int((DATA_DIR / ".lastHistoryId").read_text())
existing_msgs = []
else:
p = DATA_DIR / "swaptions"
diff --git a/python/parse_emails.py b/python/parse_emails.py
index beae201d..d2cbca6b 100644
--- a/python/parse_emails.py
+++ b/python/parse_emails.py
@@ -429,7 +429,7 @@ def pickle_drop_date(date):
if __name__ == "__main__":
try:
save_emails()
- except errors.HttpError as e:
+ except (errors.HttpError, FileNotFoundError) as e:
logging.error(e)
save_emails(update=False)
data_dir = os.path.join(os.getenv("DATA_DIR"), "swaptions")