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
This commit is contained in:
Philipp Maier authored and laforge committed 2021-11-11 08:34:14 +00:00
1 parent 51cad0d234
commit 6b590c5483
1 file changed
+1 -1
+1 -1
View File
@@ -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")