cave-stat data tuck
This commit is contained in:
parent
a42e2c5947
commit
863cbe05ca
1 changed files with 2 additions and 1 deletions
|
@ -19,6 +19,7 @@ def cave_stat():
|
|||
if "--x-of-y" in cmdline:
|
||||
position = [c for c in cmdline if " of " in c][0]
|
||||
pos, total, failed = [safe_int(a) for a in re.findall("(\d+) of (\d+)(?:, (\d+) failed)?", position)[0]]
|
||||
done = pos - 1
|
||||
|
||||
if "--destination" in cmdline:
|
||||
action = "Installing"
|
||||
|
@ -30,7 +31,7 @@ def cave_stat():
|
|||
|
||||
lines = [
|
||||
"<B>**<.> %s <W>%s<.>" %(action, atom),
|
||||
" - <G>%s of %s <g>done<.> (%.01f %% remaining)" %(pos, total, 100 - 100 * int(pos) / int(total))
|
||||
" - <G>%s of %s <g>done<.> (%.01f %% remaining)" %(done, total, 100 - 100 * int(done) / int(total))
|
||||
]
|
||||
|
||||
if failed:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue