commit
e70cfa65bb
|
|
@ -7,6 +7,7 @@ from ..general import SysCommand
|
||||||
class BlockDevice:
|
class BlockDevice:
|
||||||
def __init__(self, path, info=None):
|
def __init__(self, path, info=None):
|
||||||
if not info:
|
if not info:
|
||||||
|
from .helpers import all_disks
|
||||||
# If we don't give any information, we need to auto-fill it.
|
# If we don't give any information, we need to auto-fill it.
|
||||||
# Otherwise any subsequent usage will break.
|
# Otherwise any subsequent usage will break.
|
||||||
info = all_disks()[path].info
|
info = all_disks()[path].info
|
||||||
|
|
@ -220,4 +221,4 @@ class BlockDevice:
|
||||||
def get_partition(self, uuid):
|
def get_partition(self, uuid):
|
||||||
for partition in self:
|
for partition in self:
|
||||||
if partition.uuid == uuid:
|
if partition.uuid == uuid:
|
||||||
return partition
|
return partition
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue