laforge submitted this change.
pySim.esim.saip.FsNodeADF: Fix __str__ method
It's quite common for a FsNodeADF to not have a df_name, so we need
to guard against that during stringification to avoid an exception.
Change-Id: I919d7c46575e0ebcdf3b979347a5cdd1a9feb294
---
M pySim/esim/saip/__init__.py
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/pySim/esim/saip/__init__.py b/pySim/esim/saip/__init__.py
index c97195f..3828023 100644
--- a/pySim/esim/saip/__init__.py
+++ b/pySim/esim/saip/__init__.py
@@ -2040,7 +2040,8 @@
super().__init__(fid, parent, file, name)
def __str__(self):
- return '%s(%s)' % (self.__class__.__name__, b2h(self.df_name))
+ # self.df_name is usually None for an ADF like ADF.USIM or ADF.ISIM so we need to guard against it
+ return '%s(%s)' % (self.__class__.__name__, b2h(self.df_name) if self.df_name else None)
class FsNodeMF(FsNodeDF):
"""The MF (Master File) in the filesystem hierarchy."""
To view, visit change 40759. To unsubscribe, or for help writing mail filters, visit settings.