commit | 487c7d8aaf463efa6561ec0ca8a5f25cb668c7c9 | [log] [tgz] |
---|---|---|
author | Arnaldo Carvalho de Melo <acme@redhat.com> | Tue Sep 01 12:24:27 2015 -0300 |
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | Tue Sep 01 12:26:22 2015 -0300 |
tree | 5c296c56977abf97f414bb66ac87ae7fd3018277 | |
parent | 0e5f12f00b3e6bf7b1f3ead30b04876252ea4f1b [diff] |
smaps: Add __len__ method Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
diff --git a/procfs/procfs.py b/procfs/procfs.py index dd9778d..21d2143 100755 --- a/procfs/procfs.py +++ b/procfs/procfs.py
@@ -777,6 +777,9 @@ self.entries.append(smaps_lib(lines)) return line + def __len__(self): + return len(self.entries) + def __getitem__(self, index): return self.entries[index]