aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@osmocom.org>2023-06-06 09:03:27 +0200
committerHarald Welte <laforge@osmocom.org>2023-06-06 17:36:39 +0200
commitc85ae4188fe868dbb29cfd29baa3e96221ce6c81 (patch)
treeef1e6b0d7bae1f41aa44050d86626bd0d8013439
parent892526ffd0f9e8f410e54b98f40b3522ccc4af52 (diff)
Fix result parsing of "suspend_uicc"
prior to this patch, the suspend_uicc command would always cause a python exception as a list of integers was returned by decode_duration rather than a single integer (that can be used with %u format string). Change-Id: I981e9d46607193176b28cb574564e6da546501ba
-rw-r--r--pySim/commands.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pySim/commands.py b/pySim/commands.py
index b0f8b39..6acdb2e 100644
--- a/pySim/commands.py
+++ b/pySim/commands.py
@@ -610,7 +610,7 @@ class SimCardCommands:
def decode_duration(enc: Hexstr) -> int:
time_unit = enc[:2]
- length = h2i(enc[2:4])
+ length = h2i(enc[2:4])[0]
if time_unit == '04':
return length * 10*24*60*60
elif time_unit == '03':