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

Method initialize_csv

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

Source from the content-addressed store, hash-verified

573 handler.wfile.write(json.dumps({"status": "error", "message": str(e)}).encode('utf-8'))
574
575 def initialize_csv(self, handler):
576 try:
577 self.shared_data.generate_actions_json()
578 self.shared_data.initialize_csv()
579 self.shared_data.create_livestatusfile()
580 handler.send_response(200)
581 handler.send_header("Content-type", "application/json")
582 handler.end_headers()
583 handler.wfile.write(json.dumps({"status": "success", "message": "CSV files initialized successfully"}).encode('utf-8'))
584 except Exception as e:
585 handler.send_response(500)
586 handler.send_header("Content-type", "application/json")
587 handler.end_headers()
588 handler.wfile.write(json.dumps({"status": "error", "message": str(e)}).encode('utf-8'))
589
590 def reboot_system(self, handler):
591 try:

Callers

nothing calls this directly

Calls 4

generate_actions_jsonMethod · 0.80
create_livestatusfileMethod · 0.80
writeMethod · 0.45
encodeMethod · 0.45

Tested by

no test coverage detected