mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-28 19:58:18 +01:00
Update toolbar status
This commit is contained in:
parent
d4144c1052
commit
2247f5d797
3 changed files with 13 additions and 7 deletions
|
@ -50,7 +50,7 @@ def pkg_upgrade(repo, skip):
|
|||
# unsize = data[3]
|
||||
data = repo_data(PACKAGES_TXT, repo, flag="")
|
||||
for pkg in installed():
|
||||
status(0.0003)
|
||||
status(0.0005)
|
||||
inst_pkg = split_package(pkg)
|
||||
for name in data[0]:
|
||||
if name: # this tips because some pkg_name is empty
|
||||
|
|
|
@ -40,7 +40,7 @@ def repo_data(PACKAGES_TXT, repo, flag):
|
|||
rname, rlocation, rsize, runsize) = ([] for i in range(8))
|
||||
for line in PACKAGES_TXT.splitlines():
|
||||
if _meta_.rsl_deps in ["on", "ON"] and flag != "--resolve-off":
|
||||
status(0.000000005)
|
||||
status(0.000005)
|
||||
if line.startswith("PACKAGE NAME:"):
|
||||
name.append(line[15:].strip())
|
||||
if line.startswith("PACKAGE LOCATION:"):
|
||||
|
|
|
@ -27,8 +27,14 @@ import time
|
|||
|
||||
|
||||
def status(sec):
|
||||
syms = ["\\", "|", "/", "-"]
|
||||
for sym in syms:
|
||||
sys.stdout.write("\b{0}".format(sym))
|
||||
sys.stdout.flush()
|
||||
time.sleep(float(sec))
|
||||
"""Toolbar progressive status
|
||||
"""
|
||||
try:
|
||||
syms = ["\\", "|", "/", "-"]
|
||||
for sym in syms:
|
||||
sys.stdout.write("\b{0}".format(sym))
|
||||
sys.stdout.flush()
|
||||
time.sleep(float(sec))
|
||||
except KeyboardInterrupt:
|
||||
print("")
|
||||
sys.exit(0)
|
||||
|
|
Loading…
Add table
Reference in a new issue