mirror of
https://github.com/Justuser3310/jetwork.git
synced 2025-01-18 17:08:48 +00:00
up
This commit is contained in:
parent
1bc483a3b6
commit
30ca35cd4b
1
main.py
1
main.py
@ -44,6 +44,7 @@ server.start()
|
||||
|
||||
# Стартуем авто-поиск портов и авто-обновление сайтов
|
||||
updater = Thread(target = update_demon, args=(serv_port,))
|
||||
updater.daemon = True
|
||||
updater.start()
|
||||
|
||||
# Стартуем интерфейс
|
||||
|
24
network.py
24
network.py
@ -85,18 +85,20 @@ def server(http_port):
|
||||
conn.send("accepted".encode())
|
||||
client(port, f"get_{site}")
|
||||
elif op == "check_all":
|
||||
sites = next(os.walk('cached/'), (None, None, []))[1]
|
||||
sites_comp = ""
|
||||
for i in sites:
|
||||
# Проверяем версию
|
||||
ver = read(f"cached/{i}/config.json")["ver"]
|
||||
sites_comp += i + f"_{ver}<>"
|
||||
sites_comp = sites_comp[:-2]
|
||||
if sites_comp == "":
|
||||
try:
|
||||
sites = next(os.walk('cached/'), (None, None, []))[1]
|
||||
sites_comp = ""
|
||||
for i in sites:
|
||||
# Проверяем версию
|
||||
ver = read(f"cached/{i}/config.json")["ver"]
|
||||
sites_comp += i + f"_{ver}<>"
|
||||
sites_comp = sites_comp[:-2]
|
||||
if sites_comp == "":
|
||||
conn.send("None".encode())
|
||||
else:
|
||||
conn.send(sites_comp.encode())
|
||||
except:
|
||||
conn.send("None".encode())
|
||||
else:
|
||||
conn.send(sites_comp.encode())
|
||||
|
||||
conn.close()
|
||||
|
||||
except Exception as e:
|
||||
|
Loading…
Reference in New Issue
Block a user