def run(self, handler):
        """Start bottle server."""
        import eventlet.patcher
        if not eventlet.patcher.is_monkey_patched(os):
            msg = ("%s requires eventlet.monkey_patch() (before "
                   "import)" % self.__class__.__name__)
            raise RuntimeError(msg)

        # Separate out wsgi.server arguments
        wsgi_args = {}
        for arg in ('log', 'environ', 'max_size', 'max_http_version',
                    'protocol', 'server_event', 'minimum_chunk_size',
                    'log_x_forwarded_for', 'custom_pool', 'keepalive',
                    'log_output', 'log_format', 'url_length_limit', 'debug',
                    'socket_timeout', 'capitalize_response_headers'):
            try:
                wsgi_args[arg] = self.options.pop(arg)
            except KeyError:
                pass
        if 'log_output' not in wsgi_args:
            wsgi_args['log_output'] = not self.quiet

        import eventlet.wsgi
        sock = self.options.pop('shared_socket', None) or self.get_socket()
        eventlet.wsgi.server(sock, handler, **wsgi_args)
def run ( self , handler ) : import eventlet . patcher if not eventlet . patcher . is_monkey_patched ( os ) : msg = ( "%s requires eventlet.monkey_patch() (before " "import)" % self . __class__ . __name__ ) raise RuntimeError ( msg ) wsgi_args = { } for arg in ( 'log' , 'environ' , 'max_size' , 'max_http_version' , 'protocol' , 'server_event' , 'minimum_chunk_size' , 'log_x_forwarded_for' , 'custom_pool' , 'keepalive' , 'log_output' , 'log_format' , 'url_length_limit' , 'debug' , 'socket_timeout' , 'capitalize_response_headers' ) : try : wsgi_args [ arg ] = self . options . pop ( arg ) except KeyError : pass if 'log_output' not in wsgi_args : wsgi_args [ 'log_output' ] = not self . quiet import eventlet . wsgi sock = self . options . pop ( 'shared_socket' , None ) or self . get_socket ( ) eventlet . wsgi . server ( sock , handler , ** wsgi_args )
Start bottle server.