From 1bc483a3b6e0a436713dc53c089518848332df6e Mon Sep 17 00:00:00 2001 From: none Date: Mon, 26 Feb 2024 22:47:50 +0300 Subject: [PATCH] up --- main.py | 2 -- network.py | 3 +-- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/main.py b/main.py index a004671..3fe5686 100644 --- a/main.py +++ b/main.py @@ -37,8 +37,6 @@ rp_serv.start() #http сервер http = Thread(target = server_http) http.start() -sleep(1) -os.chdir("../") # возвращаемся в корень # сервер для пинга server = Thread(target = server, args=(http_port,)) server.start() diff --git a/network.py b/network.py index 6e6b3bc..2739af1 100644 --- a/network.py +++ b/network.py @@ -38,8 +38,7 @@ def port_gen(): def server_http(): while True: try: - os.chdir("cached") - os.system("python -m http.server") + os.system("python -m http.server --directory cached") except Exception as e: print("SERVER_HTTP FALLED") logging.critical(e, exc_info=True)