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)
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)
def close_tab(prefix): # Try stdin if arguments are empty logger.info('Closing tabs: %s', prefix) api = MultipleMediatorsAPI(create_clients()) api.close_tabs([prefix])