Added .unmount() to MapperDev()
This commit is contained in:
parent
914ff38045
commit
852bc32077
|
|
@ -109,4 +109,12 @@ class MapperDev:
|
|||
except SysCallError as err:
|
||||
raise DiskError(f"Could not mount {self.path} to {target} using options {options}: {err}")
|
||||
|
||||
return True
|
||||
|
||||
def unmount(self, target :str, fs :Optional[str] = None, options :str = '') -> bool:
|
||||
try:
|
||||
SysCommand(f"/usr/bin/umount {self.path}")
|
||||
except SysCallError as error:
|
||||
raise DiskError(f"Could not unmount {self.path} properly: {error}")
|
||||
|
||||
return True
|
||||
|
|
@ -333,7 +333,6 @@ class SysCommandWorker:
|
|||
for fileno, event in self.poll_object.poll(0.1):
|
||||
try:
|
||||
output = os.read(fileno, 8192)
|
||||
print('Output:', output)
|
||||
self.peak(output)
|
||||
self._trace_log += output
|
||||
except OSError as error:
|
||||
|
|
|
|||
|
|
@ -187,7 +187,6 @@ class luks2:
|
|||
pw_given = False
|
||||
while cryptworker.is_alive():
|
||||
if bytes(f'Enter passphrase for {partition.path}', 'UTF-8') in cryptworker and pw_given is False:
|
||||
print('Entered the passphrase..')
|
||||
cryptworker.write(password)
|
||||
pw_given = True
|
||||
time.sleep(0.25)
|
||||
|
|
|
|||
Loading…
Reference in New Issue