|
|
@ -85,18 +85,20 @@ def server(http_port):
|
|
|
|
conn.send("accepted".encode())
|
|
|
|
conn.send("accepted".encode())
|
|
|
|
client(port, f"get_{site}")
|
|
|
|
client(port, f"get_{site}")
|
|
|
|
elif op == "check_all":
|
|
|
|
elif op == "check_all":
|
|
|
|
sites = next(os.walk('cached/'), (None, None, []))[1]
|
|
|
|
try:
|
|
|
|
sites_comp = ""
|
|
|
|
sites = next(os.walk('cached/'), (None, None, []))[1]
|
|
|
|
for i in sites:
|
|
|
|
sites_comp = ""
|
|
|
|
# Проверяем версию
|
|
|
|
for i in sites:
|
|
|
|
ver = read(f"cached/{i}/config.json")["ver"]
|
|
|
|
# Проверяем версию
|
|
|
|
sites_comp += i + f"_{ver}<>"
|
|
|
|
ver = read(f"cached/{i}/config.json")["ver"]
|
|
|
|
sites_comp = sites_comp[:-2]
|
|
|
|
sites_comp += i + f"_{ver}<>"
|
|
|
|
if sites_comp == "":
|
|
|
|
sites_comp = sites_comp[:-2]
|
|
|
|
|
|
|
|
if sites_comp == "":
|
|
|
|
|
|
|
|
conn.send("None".encode())
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
conn.send(sites_comp.encode())
|
|
|
|
|
|
|
|
except:
|
|
|
|
conn.send("None".encode())
|
|
|
|
conn.send("None".encode())
|
|
|
|
else:
|
|
|
|
|
|
|
|
conn.send(sites_comp.encode())
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
conn.close()
|
|
|
|
conn.close()
|
|
|
|
|
|
|
|
|
|
|
|
except Exception as e:
|
|
|
|
except Exception as e:
|
|
|
|