From 7c6777d127fd7c5f25ce8be91cfa3a601b203613 Mon Sep 17 00:00:00 2001 From: Philipp Maier Date: Thu, 19 Jan 2023 12:19:00 +0100 Subject: [PATCH] common: also accept single digit values for mnclen when using the --mnclen option it is easy to get confused with the parameter. The parameter has to be a two digit hex value. To make things easier lets convert a single digit hex value to two digit one automatically. --- common.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common.py b/common.py index 39858e9..d718fce 100644 --- a/common.py +++ b/common.py @@ -84,6 +84,8 @@ class Common(): elif opt in ("-n", "--mnclen"): self.show_mnclen = True elif opt in ("-N", "--set-mnclen"): + if len(arg) == 1: + arg = "0" + arg self.write_mnclen = asciihex_to_list(arg) elif opt in ("-l", "--milenage"): self.show_milenage = True