commiting strings in src/handler.py for no response data

master
serkus 2 years ago
parent ffee5f53fd
commit 3fed74d521

@ -67,13 +67,13 @@ class Handler(BaseHTTPRequestHandler):
except Exception(e): except Exception(e):
print(e) print(e)
self.r_t = json.dumps(pkg_list) self.r_t = json.dumps(pkg_list)
""""
elif self.path == '/main': elif self.path == '/main':
#print(self.rfile.read()) #print(self.rfile.read())
with open("./README.txt", 'r') as f: with open("./README.txt", 'r') as f:
self.r_t = str(f.read()) self.r_t = str(f.read())
#self.r_t = s #self.r_t = s
"""
elif self.path == '/ovelays': elif self.path == '/ovelays':
overlays = get_list_overlays() overlays = get_list_overlays()
#print(ovls) #print(ovls)
@ -93,7 +93,7 @@ class Handler(BaseHTTPRequestHandler):
self.r_static() self.r_static()
self.send_response(200) self.send_response(200)
#print(self.r_t) #print(self.r_t)
"""
elif self.path == '/get_dump_list': elif self.path == '/get_dump_list':
try: try:
with open('./pkgs.json', 'tr') as fn: with open('./pkgs.json', 'tr') as fn:
@ -103,7 +103,7 @@ class Handler(BaseHTTPRequestHandler):
except Exception (e): except Exception (e):
print(str(e)) print(str(e))
self.r_t = json.dumps({"dump_portage": pkg_list}) self.r_t = json.dumps({"dump_portage": pkg_list})
"""
elif self.path.startswith("/?st_app="): elif self.path.startswith("/?st_app="):
config = load_config() config = load_config()
param = self.path.replace("/?st_app=", "") param = self.path.replace("/?st_app=", "")
@ -149,13 +149,13 @@ class Handler(BaseHTTPRequestHandler):
#self.r_t = str(sort_inatll_pkg()) #self.r_t = str(sort_inatll_pkg())
self.r_t = str(json.dumps(scan_config_portage())) self.r_t = str(json.dumps(scan_config_portage()))
"""
elif '.py?' in self.path: elif '.py?' in self.path:
print("loading") print("loading")
self.path = str(self.path.split('?')[0]) self.path = str(self.path.split('?')[0])
print(self.path) print(self.path)
self.r_static() self.r_static()
"""
else: else:
self.send_response(404) self.send_response(404)

Loading…
Cancel
Save