def main(): CONF.register_cli_opt(command_opt) service.prepare_service(sys.argv) try: CONF.command.func() except Exception as e: sys.exit("ERROR: %s" % e)
def main(): service.prepare_service(sys.argv) # Build and start the WSGI app host = CONF.bind_ip port = CONF.port wsgi = simple_server.make_server(host, port, Application()) LOG = log.getLogger(__name__) LOG.info(_("Serving on http://%(host)s:%(port)d"), {"host": host, "port": port}) CONF.log_opt_values(LOG, logging.INFO) try: wsgi.serve_forever() except KeyboardInterrupt: pass
def main(): service.prepare_service(sys.argv) # Build and start the WSGI app host = CONF.bind_ip port = CONF.port wsgi = simple_server.make_server(host, port, Application()) LOG = log.getLogger(__name__) LOG.info(_("Serving on http://%(host)s:%(port)d"), { 'host': host, 'port': port }) CONF.log_opt_values(LOG, logging.INFO) try: wsgi.serve_forever() except KeyboardInterrupt: pass