add RecordCollection.findEntrypoints()
This commit is contained in:
parent
b5aec5940e
commit
d34d9272fe
|
@ -67,3 +67,12 @@ class RecordCollection():
|
|||
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
def findEntrypoints(self):
|
||||
ret = []
|
||||
|
||||
for i in self.objects:
|
||||
if not self.objects[i].parents:
|
||||
ret.append(self.objects[i])
|
||||
|
||||
return ret
|
||||
|
|
|
@ -2,4 +2,7 @@ import record
|
|||
|
||||
records = record.RecordCollection('datafile')
|
||||
|
||||
entries = records.findEntrypoints()
|
||||
|
||||
print(records.objects)
|
||||
print(entries)
|
||||
|
|
Loading…
Reference in New Issue