def _run_flup(app, config, mode):
<EOL>if mode == "<STR_LIT>":<EOL><INDENT>from flup.server.fcgi import WSGIServer, __version__ as flupver<EOL><DEDENT>elif mode == "<STR_LIT>":<EOL><INDENT>from flup.server.fcgi_fork import WSGIServer, __version__ as flupver<EOL><DEDENT>else:<EOL><INDENT>raise ValueError<EOL><DEDENT>_logger.info(<EOL>"<STR_LIT>".format(<EOL>__version__, WSGIServer.__module__, flupver<EOL>)<EOL>)<EOL>server = WSGIServer(<EOL>app,<EOL>bindAddress=(config["<STR_LIT:host>"], config["<STR_LIT:port>"]),<EOL>)<EOL>try:<EOL><INDENT>server.run()<EOL><DEDENT>except KeyboardInterrupt:<EOL><INDENT>_logger.warning("<STR_LIT>")<EOL><DEDENT>return<EOL>
Run WsgiDAV using flup.server.fcgi if Flup is installed.