Yielding actual partitions and not just the partition number :)
This commit is contained in:
parent
2262cd6196
commit
9767095258
|
|
@ -24,7 +24,7 @@ class BlockDevice():
|
||||||
|
|
||||||
def __iter__(self):
|
def __iter__(self):
|
||||||
for partition in self.partitions:
|
for partition in self.partitions:
|
||||||
yield partition
|
yield self.partitions[partition]
|
||||||
|
|
||||||
def __getitem__(self, key, *args, **kwargs):
|
def __getitem__(self, key, *args, **kwargs):
|
||||||
if key not in self.info:
|
if key not in self.info:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue