Move device after options in lsblk command (#2670)
This commit is contained in:
parent
6a2a204f18
commit
876d155be9
|
|
@ -1431,15 +1431,15 @@ def _fetch_lsblk_info(
|
||||||
fields = [_clean_field(f, CleanType.Lsblk) for f in LsblkInfo.fields()]
|
fields = [_clean_field(f, CleanType.Lsblk) for f in LsblkInfo.fields()]
|
||||||
cmd = ['lsblk', '--json', '--bytes', '--output', '+' + ','.join(fields)]
|
cmd = ['lsblk', '--json', '--bytes', '--output', '+' + ','.join(fields)]
|
||||||
|
|
||||||
if dev_path:
|
|
||||||
cmd.append(str(dev_path))
|
|
||||||
|
|
||||||
if reverse:
|
if reverse:
|
||||||
cmd.append('--inverse')
|
cmd.append('--inverse')
|
||||||
|
|
||||||
if full_dev_path:
|
if full_dev_path:
|
||||||
cmd.append('--paths')
|
cmd.append('--paths')
|
||||||
|
|
||||||
|
if dev_path:
|
||||||
|
cmd.append(str(dev_path))
|
||||||
|
|
||||||
try:
|
try:
|
||||||
result = SysCommand(cmd).decode()
|
result = SysCommand(cmd).decode()
|
||||||
except SysCallError as err:
|
except SysCallError as err:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue