MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / serve_netkb_data

Method serve_netkb_data

utils.py:694–706  ·  view source on GitHub ↗
(self, handler)

Source from the content-addressed store, hash-verified

692
693
694 def serve_netkb_data(self, handler):
695 try:
696 latest_file = self.shared_data.netkbfile
697 table_html = self.generate_html_table_netkb(latest_file)
698 handler.send_response(200)
699 handler.send_header("Content-type", "text/html")
700 handler.end_headers()
701 handler.wfile.write(table_html.encode('utf-8'))
702 except Exception as e:
703 handler.send_response(500)
704 handler.send_header("Content-type", "application/json")
705 handler.end_headers()
706 handler.wfile.write(json.dumps({"status": "error", "message": str(e)}).encode('utf-8'))
707
708 def update_nmconnection(self, ssid, password):
709 config_path = '/etc/NetworkManager/system-connections/preconfigured.nmconnection'

Callers

nothing calls this directly

Calls 3

writeMethod · 0.45
encodeMethod · 0.45

Tested by

no test coverage detected