From 4e2e1d9fd3eef1c2ccdb6c7054dae6d4d89c26d5 Mon Sep 17 00:00:00 2001 From: Philipp Maier Date: Mon, 8 Nov 2021 15:36:01 +0100 Subject: [PATCH] filesystem: make sure the card is in a defined state When the runtime state is created there is already some interaction with the card. Lets make sure that the card is in a defined state when we leave the constructor of the RuntimeState. Change-Id: I986204964903069bcce781afdbf3c5d26682b749 Related: OS#5274 --- pySim/filesystem.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pySim/filesystem.py b/pySim/filesystem.py index 3d2687f9..6010c302 100644 --- a/pySim/filesystem.py +++ b/pySim/filesystem.py @@ -1074,6 +1074,10 @@ class RuntimeState(object): self.mf.add_file(f) self.conserve_write = True + # make sure that when the runtime state is created, the card is also + # in a defined state. + self.reset() + def _match_applications(self): """match the applications from the profile with applications on the card""" apps_profile = self.profile.applications