mirror of
https://gitea.osmocom.org/sim-card/pysim.git
synced 2026-03-29 01:30:19 +03:00
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
This commit is contained in:
@@ -610,7 +610,7 @@ class SimCardCommands:
|
|||||||
|
|
||||||
def decode_duration(enc: Hexstr) -> int:
|
def decode_duration(enc: Hexstr) -> int:
|
||||||
time_unit = enc[:2]
|
time_unit = enc[:2]
|
||||||
length = h2i(enc[2:4])
|
length = h2i(enc[2:4])[0]
|
||||||
if time_unit == '04':
|
if time_unit == '04':
|
||||||
return length * 10*24*60*60
|
return length * 10*24*60*60
|
||||||
elif time_unit == '03':
|
elif time_unit == '03':
|
||||||
|
|||||||
Reference in New Issue
Block a user