예제 #1
0
def process_options(parser, options, args):
    if args.sysinfo:
        print(debug.sysinfo())
        sys.exit(0)
    debug.register_info_dumpers()
    pconf = config.ProxyConfig(options)
    if options.no_server:
        return server.DummyServer(pconf)
    else:
        try:
            return server.ProxyServer(pconf)
        except exceptions.ServerException as v:
            print(str(v), file=sys.stderr)
            sys.exit(1)
예제 #2
0
def process_options(parser, options, args):
    if args.sysinfo:
        print(debug.sysinfo())
        sys.exit(0)
    debug.register_info_dumpers()
    pconf = config.ProxyConfig(options)
    if options.no_server:
        return server.DummyServer(pconf)
    else:
        try:
            return server.ProxyServer(pconf)
        except exceptions.ServerException as v:
            print(str(v), file=sys.stderr)
            sys.exit(1)
예제 #3
0
def test_sysinfo():
    assert debug.sysinfo()