laforge has uploaded this change for review. (
https://gerrit.osmocom.org/c/pysim/+/37736?usp=email )
Change subject: pySim.filesystem: Add __len__ method to Path object
......................................................................
pySim.filesystem: Add __len__ method to Path object
This returns the length of the path.
Change-Id: I5e3ba726ed180405c4218ebeee240a3a40527f99
---
M pySim/filesystem.py
1 file changed, 14 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/36/37736/1
diff --git a/pySim/filesystem.py b/pySim/filesystem.py
index 0c7d51d..2151c21 100644
--- a/pySim/filesystem.py
+++ b/pySim/filesystem.py
@@ -1471,6 +1471,9 @@
def __getitem__(self, i):
return self.list[i]
+ def __len__(self):
+ return len(self.list)
+
def __add__(self, a):
if isinstance(a, list):
l = self.list + a
--
To view, visit
https://gerrit.osmocom.org/c/pysim/+/37736?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I5e3ba726ed180405c4218ebeee240a3a40527f99
Gerrit-Change-Number: 37736
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newchange