From d3fb38965b6c11461250ce22557f9200c70e7303 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Fri, 26 Jul 2024 08:59:04 +0200 Subject: [PATCH] ara_m: Fix pySim.tlv.IE.from_dict() calls Historically, to_dict and from_dict were not symmetric; this has been fixed in I07e4feb3800b420d8be7aae8911f828f1da9dab8 in December 2023. This however broke the ara_m legacy use of the from_dict() methods. We've just introduced a from_val_dict() method in I81654ea54aed9e598943f41a26a57dcc3a7f10c2, let's make use of it. Change-Id: I3aaec40eb665d6254be7b103444c04ff48aac36d --- pySim/ara_m.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pySim/ara_m.py b/pySim/ara_m.py index 66418935..5544eed7 100644 --- a/pySim/ara_m.py +++ b/pySim/ara_m.py @@ -296,8 +296,8 @@ class ADF_ARAM(CardADF): @staticmethod def get_config(tp, v_major=0, v_minor=0, v_patch=1): cmd_do = DeviceConfigDO() - cmd_do.from_dict([{'device_interface_version_do': { - 'major': v_major, 'minor': v_minor, 'patch': v_patch}}]) + cmd_do.from_val_dict([{'device_interface_version_do': { + 'major': v_major, 'minor': v_minor, 'patch': v_patch}}]) return ADF_ARAM.xceive_apdu_tlv(tp, '80cadf21', cmd_do, ResponseAramConfigDO) @with_default_category('Application-Specific Commands') @@ -370,7 +370,7 @@ class ADF_ARAM(CardADF): ar_do_content += [{'perm_ar_do': {'permissions': opts.android_permissions}}] d = [{'ref_ar_do': [{'ref_do': ref_do_content}, {'ar_do': ar_do_content}]}] csrado = CommandStoreRefArDO() - csrado.from_dict(d) + csrado.from_val_dict(d) res_do = ADF_ARAM.store_data(self._cmd.lchan.scc._tp, csrado) if res_do: self._cmd.poutput_json(res_do.to_dict())