From 6b590c5483965051b638bde638eb28beee371fa9 Mon Sep 17 00:00:00 2001 From: Philipp Maier Date: Wed, 10 Nov 2021 16:38:40 +0100 Subject: [PATCH] filesystem: CardProfile: initialize empty sw table as empty dict The table that holds the status word descriptions is initialized as an empty list '[]'. This is not correct since the interpret_sw method processes this data as dictionary, so lets initialize the sw member with an empty dict '{}' when not status word description is given. Change-Id: I3cae83f0f6ab274546991ecd14425f094b2816b2 Related: OS#5274 --- pySim/filesystem.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pySim/filesystem.py b/pySim/filesystem.py index 24872c02..0238c971 100644 --- a/pySim/filesystem.py +++ b/pySim/filesystem.py @@ -1461,7 +1461,7 @@ class CardProfile(object): self.name = name self.desc = kw.get("desc", None) self.files_in_mf = kw.get("files_in_mf", []) - self.sw = kw.get("sw", []) + self.sw = kw.get("sw", {}) self.applications = kw.get("applications", []) self.shell_cmdsets = kw.get("shell_cmdsets", []) self.cla = kw.get("cla", "00")