Change in pysim[master]: filsystem.py: Add more information to exceptions

laforge gerrit-no-reply at lists.osmocom.org
Wed Apr 21 09:02:52 UTC 2021


laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/23841 )


Change subject: filsystem.py: Add more information to exceptions
......................................................................

filsystem.py: Add more information to exceptions

Change-Id: Ia9449ddfaaf5f49e0a65aeeea9435141fd55fe65
---
M pySim/filesystem.py
1 file changed, 3 insertions(+), 3 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/41/23841/1

diff --git a/pySim/filesystem.py b/pySim/filesystem.py
index 36588e2..c340708 100644
--- a/pySim/filesystem.py
+++ b/pySim/filesystem.py
@@ -209,13 +209,13 @@
         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
 

-- 
To view, visit https://gerrit.osmocom.org/c/pysim/+/23841
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Ia9449ddfaaf5f49e0a65aeeea9435141fd55fe65
Gerrit-Change-Number: 23841
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210421/355d6d4c/attachment.htm>


More information about the gerrit-log mailing list