def process_args(args):
    # Sometimes archive.org requests blocks forever. 
    # Setting a timeout will make the request fail instead of waiting forever. 
    socket.setdefaulttimeout(args.socket_timeout)

    if args.monkeypatch:
        update_work.monkeypatch(args.config)

    global LOAD_IA_SCANS, COMMIT
    LOAD_IA_SCANS = args.load_ia_scans
    COMMIT = args.commit
Exemple #2
0
def process_args(args):
    # Sometimes archive.org requests blocks forever.
    # Setting a timeout will make the request fail instead of waiting forever.
    socket.setdefaulttimeout(args.socket_timeout)

    if args.monkeypatch:
        update_work.monkeypatch(args.config)

    global LOAD_IA_SCANS, COMMIT
    LOAD_IA_SCANS = args.load_ia_scans
    COMMIT = args.commit
def process_args(args):
    if args.debugger:
        import ptvsd

        logger.info("Enabling debugger attachment (attach if it hangs here)")
        ptvsd.enable_attach(address=('0.0.0.0', 3000))
        logger.info("Waiting for debugger to attach...")
        ptvsd.wait_for_attach()
        logger.info("Debugger attached to port 3000")

    # Sometimes archive.org requests blocks forever.
    # Setting a timeout will make the request fail instead of waiting forever.
    socket.setdefaulttimeout(args.socket_timeout)

    if args.monkeypatch:
        update_work.monkeypatch(args.config)

    global LOAD_IA_SCANS, COMMIT
    LOAD_IA_SCANS = args.load_ia_scans
    COMMIT = args.commit