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

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

laforge gerrit-no-reply at lists.osmocom.org
Thu Apr 22 09:27:27 UTC 2021


laforge has submitted this change. ( 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(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved



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 @@
         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: 2
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210422/b07c5390/attachment.htm>


More information about the gerrit-log mailing list