Skip to content

Commit

Permalink
Backwards compatible string format.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexdlaird committed Nov 5, 2024
1 parent 6a925dc commit b1030f7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions amazonorders/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,14 +206,16 @@ def transactions(ctx: Context, **kwargs: Any):
)
click.echo("Info: Fetching transaction history, this might take a minute ...")

amazon_transactions = AmazonTransactions(amazon_session, config=ctx.obj["conf"])
config = ctx.obj["conf"]
amazon_transactions = AmazonTransactions(amazon_session,
onfig=config)

transactions = amazon_transactions.get_transactions(days=days)

click.echo("... {} transactions parsed.\n".format(len(transactions)))

for transaction in transactions:
click.echo(f"{_transaction_output(transaction, ctx.obj["conf"])}\n")
click.echo(f"{_transaction_output(transaction, config)}\n")
except AmazonOrdersError as e:
logger.debug("An error occurred.", exc_info=True)
ctx.fail(str(e))
Expand Down

0 comments on commit b1030f7

Please sign in to comment.