From 20e8515bb76153fe8c80246af554e6ef76ad1254 Mon Sep 17 00:00:00 2001 From: Edward Betts Date: Mon, 9 Sep 2024 19:16:21 +0100 Subject: [PATCH] Sometimes the diff includes Python types --- update.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/update.py b/update.py index a86b360..bde5d6f 100755 --- a/update.py +++ b/update.py @@ -2,11 +2,11 @@ """Combined update script for various data sources.""" import asyncio -import json import os import sys import typing from datetime import date, datetime +from pprint import pformat from time import time import deepdiff # type: ignore @@ -93,9 +93,7 @@ def report_space_launch_change( body = f""" A space launch of interest was updated. -Get ready for two big piles of JSON. - -{json.dumps(differences, indent=2)} +{pformat(differences)} """ agenda.mail.send_mail(config, subject, body) @@ -170,8 +168,7 @@ def main() -> None: update_gandi(app.config) agenda.geomob.update(app.config) - if hour % 12 == 0: - agenda.fx.get_rates(app.config) + agenda.fx.get_rates(app.config) update_thespacedevs(app.config)