From a9d40e790ceb2a10d42c43459a56eccbf8d26a76 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Thu, 13 Aug 2015 13:24:39 +0200 Subject: [PATCH] tools/flterm.py: cleanup kernel-adr argument parsing --- tools/flterm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/flterm.py b/tools/flterm.py index 61dcbba9..a4cf6e44 100644 --- a/tools/flterm.py +++ b/tools/flterm.py @@ -286,12 +286,12 @@ def _get_args(): parser.add_argument("--port", default="2", help="serial port") parser.add_argument("--speed", default=115200, help="serial baudrate") parser.add_argument("--kernel", default=None, help="kernel image") - parser.add_argument("--kernel-adr", default="0x40000000", help="kernel address") + parser.add_argument("--kernel-adr", type=lambda a: int(a, 16), default=0x40000000, help="kernel address") return parser.parse_args() if __name__ == "__main__": args = _get_args() - flterm = Flterm(args.kernel, int(args.kernel_adr, 16)) + flterm = Flterm(args.kernel, args.kernel_adr) flterm.open(args.port, args.speed) flterm.start() try: -- 2.30.2