mirror of
https://github.com/9001/copyparty.git
synced 2026-04-03 06:18:08 +10:00
add types, isort, errorhandling
This commit is contained in:
@@ -58,13 +58,13 @@ class CState(threading.Thread):
|
||||
remotes.append("?")
|
||||
remotes_ok = False
|
||||
|
||||
m = []
|
||||
ta = []
|
||||
for conn, remote in zip(self.cs, remotes):
|
||||
stage = len(conn.st)
|
||||
m.append(f"\033[3{colors[stage]}m{remote}")
|
||||
ta.append(f"\033[3{colors[stage]}m{remote}")
|
||||
|
||||
m = " ".join(m)
|
||||
print(f"{m}\033[0m\n\033[A", end="")
|
||||
t = " ".join(ta)
|
||||
print(f"{t}\033[0m\n\033[A", end="")
|
||||
|
||||
|
||||
def allget(cs, urls):
|
||||
|
||||
@@ -72,6 +72,8 @@ def tc1(vflags):
|
||||
for _ in range(10):
|
||||
try:
|
||||
os.mkdir(td)
|
||||
if os.path.exists(td):
|
||||
break
|
||||
except:
|
||||
time.sleep(0.1) # win10
|
||||
|
||||
|
||||
Reference in New Issue
Block a user