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

Method restore_default_config

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

Source from the content-addressed store, hash-verified

369 handler.wfile.write(json.dumps(config_payload).encode('utf-8'))
370
371 def restore_default_config(self, handler):
372 handler.send_response(200)
373 handler.send_header("Content-type", "application/json")
374 handler.end_headers()
375 self.shared_data.config = self.shared_data.default_config.copy()
376 self.shared_data.save_config()
377 handler.wfile.write(json.dumps(self.shared_data.config).encode('utf-8'))
378
379 def serve_image(self, handler):
380 image_path = os.path.join(self.shared_data.webdir, 'screen.png')

Callers

nothing calls this directly

Calls 4

copyMethod · 0.80
save_configMethod · 0.80
writeMethod · 0.45
encodeMethod · 0.45

Tested by

no test coverage detected