Merge pull request #450 from charlesvdv/master

propagate options when mounting a partition
This commit is contained in:
Anton Hvornum 2021-05-15 19:28:23 +00:00 committed by GitHub
commit 2e168790c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -384,7 +384,10 @@ class Partition():
pathlib.Path(target).mkdir(parents=True, exist_ok=True)
try:
sys_command(f'/usr/bin/mount {self.path} {target}')
if options:
sys_command(f'/usr/bin/mount -o {options} {self.path} {target}')
else:
sys_command(f'/usr/bin/mount {self.path} {target}')
except SysCallError as err:
raise err