X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=main.py;h=d4bab0296855383ff439341b87ab70f45297fc00;hb=f9226903cb53a9b303a26de562e321159349f8df;hp=3cb7f4ad8a2051cf2dcdbccc96dcc02e7cab7d9e;hpb=516a2517aa428596199e56cc105c7b0132064ade;p=perso%2FImmae%2FProjets%2FCryptomonnaies%2FCryptoportfolio%2FTrader.git diff --git a/main.py b/main.py index 3cb7f4a..d4bab02 100644 --- a/main.py +++ b/main.py @@ -7,10 +7,12 @@ pg_config, report_path = helper.main_parse_config(args.config) for market_config, user_id in helper.main_fetch_markets(pg_config, args.user): try: - market_config["apiKey"] = market_config.pop("key") user_market = market.Market.from_config(market_config, debug=args.debug) helper.main_process_market(user_market, args.action, before=args.before, after=args.after) except Exception as e: - print("{}: {}".format(e.__class__.__name__, e)) + try: + user_market.report.log_error("main", exception=e) + except: + print("{}: {}".format(e.__class__.__name__, e)) finally: helper.main_store_report(report_path, user_id, user_market)