prompt: handle timeout around btrfs
This commit is contained in:
parent
eedbc09193
commit
7bfa0deecd
1 changed files with 12 additions and 8 deletions
|
@ -642,6 +642,7 @@ class StatsPart(Part):
|
|||
continue
|
||||
|
||||
btrfs_encountered_devices.add(device)
|
||||
try:
|
||||
btrfs_raw = command(["/sbin/btrfs", "fi", "usage", "-b", dir])
|
||||
|
||||
for line in btrfs_raw.split("\n"):
|
||||
|
@ -650,6 +651,9 @@ class StatsPart(Part):
|
|||
elif "Free" in line:
|
||||
stor_free = int(line.split()[-3])
|
||||
break
|
||||
except subprocess.TimeoutExpired:
|
||||
stor_total = 1
|
||||
stor_free = 0
|
||||
|
||||
else:
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue