def Start(http_port): # Load the saved backends' settings (some of them might be needed to bootstrap # as, for instance, the adb path for the Android backend). memory_inspector.RegisterAllBackends() for backend in backends.ListBackends(): for k, v in _persistent_storage.LoadSettings(backend.name).iteritems(): backend.settings[k] = v httpd = wsgiref.simple_server.make_server('127.0.0.1', http_port, _HttpRequestHandler) try: httpd.serve_forever() except KeyboardInterrupt: pass # Don't print useless stack traces when the user hits CTRL-C.
def _ListBackends(args, req_vars): # pylint: disable=W0613 return _HTTP_OK, [], [backend.name for backend in backends.ListBackends()]