Skip to content

Commit

Permalink
add try-finally statement
Browse files Browse the repository at this point in the history
  • Loading branch information
popenta committed Feb 20, 2024
1 parent 26e5848 commit b84e31c
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions multiversx_sdk_cli/cli_transactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,12 @@ def send_transaction(args: Any):
output = CLIOutputBuilder()
proxy = CustomNetworkProvider(args.proxy)

tx_hash = proxy.send_transaction(tx)
output.set_emitted_transaction_hash(tx_hash)

output = output.set_emitted_transaction(tx).build()
utils.dump_out_json(output, outfile=args.outfile)
try:
tx_hash = proxy.send_transaction(tx)
output.set_emitted_transaction_hash(tx_hash)
finally:
output = output.set_emitted_transaction(tx).build()
utils.dump_out_json(output, outfile=args.outfile)


def get_transaction(args: Any):
Expand Down

0 comments on commit b84e31c

Please sign in to comment.