Beispiel #1
0
def close_tabs(args):
    # Try stdin if arguments are empty
    tab_ids = args.tab_ids
    if len(args.tab_ids) == 0:
        tab_ids = split_tab_ids(read_stdin().strip())

    brotab_logger.info('Closing tabs: %s', tab_ids)
    api = MultipleMediatorsAPI(create_clients(args.target_hosts))
    tabs = api.close_tabs(tab_ids)
Beispiel #2
0
def close_tabs(args):
    #urls = [line.strip() for line in sys.stdin.readlines()]

    # Try stdin if arguments are empty
    tab_ids = args.tab_ids
    # print(read_stdin())
    if len(args.tab_ids) == 0:
        tab_ids = split_tab_ids(read_stdin().strip())

    logger.info('Closing tabs: %s', tab_ids)
    #api = MultipleMediatorsAPI([SingleMediatorAPI('f')])
    api = MultipleMediatorsAPI(create_clients(args))
    tabs = api.close_tabs(tab_ids)