diff options
Diffstat (limited to 'python/report_ops/__main__.py')
| -rw-r--r-- | python/report_ops/__main__.py | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/python/report_ops/__main__.py b/python/report_ops/__main__.py index 53dc9773..8082aeeb 100644 --- a/python/report_ops/__main__.py +++ b/python/report_ops/__main__.py @@ -78,11 +78,12 @@ if args.sma_positions: logger.warning(e) if args.cash_reports: - for cash_report_cls in CashReport._registry.values(): - try: - cash_report_cls(args.date).to_db() - except ValueError as e: - logger.warning(e) + for fund, custodians in _fund_custodians.items(): + for custodian in custodians: + try: + CashReport[(fund, custodian)](args.date).to_db() + except ValueError as e: + logger.warning(e) if args.isosel_reports: for fund in ("ISOSEL",): @@ -94,11 +95,12 @@ if args.isosel_reports: logger.warning(e) if args.wire_reports: - for wire_report_cls in Wire._registry.values(): - try: - wire_report_cls.to_db(args.date) - except ValueError as e: - logger.warning(e) + for fund, custodians in _fund_custodians.items(): + for custodian in custodians: + try: + Wire[(fund, custodian)].to_db(args.date) + except ValueError as e: + logger.warning(e) if args.send_to_custodians: for account in ( |
