mirror of
https://github.com/onionshare/onionshare.git
synced 2024-10-01 01:35:40 -04:00
Add terminal animation while waiting for circuits to close
This commit is contained in:
parent
7927ef83b2
commit
6d38b8e0c4
@ -767,6 +767,9 @@ class Onion(object):
|
||||
):
|
||||
rendevouz_circuit_ids.append(c.id)
|
||||
|
||||
symbols = [c for c in "\\|/-"]
|
||||
symbols_i = 0
|
||||
|
||||
while True:
|
||||
num_rend_circuits = 0
|
||||
for c in self.c.get_circuits():
|
||||
@ -782,9 +785,10 @@ class Onion(object):
|
||||
else:
|
||||
circuits = "circuits"
|
||||
print(
|
||||
f"\rWaiting for {num_rend_circuits} Tor rendezvous {circuits} to close ... ",
|
||||
f"\rWaiting for {num_rend_circuits} Tor rendezvous {circuits} to close {symbols[symbols_i]} ",
|
||||
end="",
|
||||
)
|
||||
symbols_i = (symbols_i + 1) % len(symbols)
|
||||
time.sleep(1)
|
||||
except:
|
||||
pass
|
||||
|
Loading…
Reference in New Issue
Block a user