Skip to content

Commit

Permalink
add a specific argument for ledger live log
Browse files Browse the repository at this point in the history
  • Loading branch information
tdejoigny-ledger committed Feb 7, 2025
1 parent 626ac89 commit ebcf2b2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/dale/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ def init_parser() -> ArgumentParser:
parser = ArgumentParser(description="Explicit logging of a list of APDUs",
formatter_class=RawTextHelpFormatter)
parser.add_argument("apdu_file", metavar="APDU_FILE",
help=("The file containing the list of APDUs or the "
"Ledger Live log ending in .json"),
help=("The file containing the list of APDUs"),
type=Path)
parser.add_argument("--json", action="store_true", help="Indicates that the input file is a Ledger Live log")

return parser


Expand Down Expand Up @@ -65,7 +66,7 @@ def main():
logging.info("Reading from %s", apdu_file)

# input file is Ledger Live log
if apdu_file.suffix == '.json':
if args.json:
logging.info("Pre-formatting Ledger Live log file")
apdu_file = pre_format_ledger_live_log(apdu_file)

Expand Down

0 comments on commit ebcf2b2

Please sign in to comment.