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)
|
rendevouz_circuit_ids.append(c.id)
|
||||||
|
|
||||||
|
symbols = [c for c in "\\|/-"]
|
||||||
|
symbols_i = 0
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
num_rend_circuits = 0
|
num_rend_circuits = 0
|
||||||
for c in self.c.get_circuits():
|
for c in self.c.get_circuits():
|
||||||
@ -782,9 +785,10 @@ class Onion(object):
|
|||||||
else:
|
else:
|
||||||
circuits = "circuits"
|
circuits = "circuits"
|
||||||
print(
|
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="",
|
end="",
|
||||||
)
|
)
|
||||||
|
symbols_i = (symbols_i + 1) % len(symbols)
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
Loading…
Reference in New Issue
Block a user