Skip to content

Commit

Permalink
update ssview
Browse files Browse the repository at this point in the history
  • Loading branch information
ubuntu committed Dec 4, 2018
1 parent 0c96e67 commit b085c6b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions web/ssview.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
import time
from prettytable import PrettyTable

cp = 'clear' if 'linux' in sys.platform else 'cls'
scroll = False
clear = lambda: os.system('clear' if 'linux' in sys.platform else 'cls')

def sscmd(address):
while True:
Expand Down Expand Up @@ -57,7 +58,8 @@ def sscmd(address):
"%d%%" % (float(i["hdd_used"]) / i["hdd_total"] * 100),
]
)
os.system(cp)
if scroll is True:
clear()
print(ss)
time.sleep(1)

Expand Down

0 comments on commit b085c6b

Please sign in to comment.