fileystem: Use human-readable ADF name if available.

When using __str__ for a CardDF we would get "DF(DF.TELECOM)"
but when using it on CardADF we would get ADF(a0000000871002)"
instead of "ADF(ADF.USIM)".  Let's fix that.

Change-Id: I5801a08bcc28cb222734af6d9ee835227f4fee69
This commit is contained in:
Harald Welte 2022-07-16 11:55:07 +02:00
parent 1e52b0d3b7
commit 4b00365c6e
1 changed files with 1 additions and 1 deletions

View File

@ -488,7 +488,7 @@ class CardADF(CardDF):
mf.add_application_df(self)
def __str__(self):
return "ADF(%s)" % (self.aid)
return "ADF(%s)" % (self.name if self.name else self.aid)
def _path_element(self, prefer_name: bool):
if self.name and prefer_name: