From 977035c429f4f4a1aa61e82129f6a1cffe1d6339 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Wed, 21 Apr 2021 11:01:26 +0200 Subject: filsystem.py: Add more information to exceptions Change-Id: Ia9449ddfaaf5f49e0a65aeeea9435141fd55fe65 --- pySim/filesystem.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pySim/filesystem.py b/pySim/filesystem.py index 2023495..1068930 100644 --- a/pySim/filesystem.py +++ b/pySim/filesystem.py @@ -209,13 +209,13 @@ class CardDF(CardFile): if child.fid in self.children: if ignore_existing: return - raise ValueError("File with given fid %s already exists" % (child.fid)) + raise ValueError("File with given fid %s already exists in %s" % (child.fid, self)) if self.lookup_file_by_sfid(child.sfid): - raise ValueError("File with given sfid %s already exists" % (child.sfid)) + raise ValueError("File with given sfid %s already exists in %s" % (child.sfid, self)) if self.lookup_file_by_name(child.name): if ignore_existing: return - raise ValueError("File with given name %s already exists" % (child.name)) + raise ValueError("File with given name %s already exists in %s" % (child.name, self)) self.children[child.fid] = child child.parent = self -- cgit v1.2.3