mirror of
https://gitea.osmocom.org/sim-card/pysim.git
synced 2026-03-16 18:38:32 +03:00
pySim.filesystem: Add __len__ method to Path object
This returns the length of the path. Change-Id: I5e3ba726ed180405c4218ebeee240a3a40527f99
This commit is contained in:
@@ -1471,6 +1471,9 @@ class Path:
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user