From 0311c92e961b61b5c4b383558cd8d15408be90d9 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Thu, 18 Jan 2024 16:56:34 +0100 Subject: [PATCH] Fix encoding of decoded/json data in update_{record_binary}_decoded The patch introducing the is_hexstr type into the argparser was accidentially also introduce in two locations where we actually don't expect a hex-string. This is a partial revert of I6426ea864bec82be60554dd125961a48d7751904 Change-Id: I3c3d2a2753aa7a2566a3b1add7ba70c86499d293 Closes: #6331 --- pySim/filesystem.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pySim/filesystem.py b/pySim/filesystem.py index 5d1970a6..2bc5f014 100644 --- a/pySim/filesystem.py +++ b/pySim/filesystem.py @@ -622,7 +622,7 @@ class TransparentEF(CardEF): self._cmd.poutput(data) upd_bin_dec_parser = argparse.ArgumentParser() - upd_bin_dec_parser.add_argument('data', type=is_hexstr, help='Abstract data (JSON format) to write') + upd_bin_dec_parser.add_argument('data', help='Abstract data (JSON format) to write') upd_bin_dec_parser.add_argument('--json-path', type=str, help='JSON path to modify specific element of file only') @@ -882,7 +882,7 @@ class LinFixedEF(CardEF): upd_rec_dec_parser = argparse.ArgumentParser() upd_rec_dec_parser.add_argument( 'record_nr', type=int, help='Number of record to be read') - upd_rec_dec_parser.add_argument('data', type=is_hexstr, help='Abstract data (JSON format) to write') + upd_rec_dec_parser.add_argument('data', help='Abstract data (JSON format) to write') upd_rec_dec_parser.add_argument('--json-path', type=str, help='JSON path to modify specific element of record only')