When successfully tasting a disk add the new disk as a child of the parent

This commit is contained in:
kris 2017-04-24 22:35:32 +01:00
parent da5afa2a36
commit 67683829e4

View File

@ -37,7 +37,9 @@ class Disk(container.Container):
@classmethod
def Taste(cls, disk):
# TODO: return a defined exception here
return cls(disk.name, disk.data)
newdisk = cls(disk.name, disk.data)
disk.AddChild(newdisk)
return newdisk
def SetSectorOwner(self, track, sector, owner):
self.sectors[(track, sector)] = owner