Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def main():
options = parse_option()
initialize_log_handler(options.log_level)
logger = logbook.Logger("pingparsing cli")
logger.level = options.log_level
set_log_level(options.log_level)
output = {}
use_stdin, found_stdin_specifier = is_use_stdin()
if not use_stdin and not found_stdin_specifier:
from concurrent import futures
max_workers = (
multiprocessing.cpu_count() * 2 if options.max_workers is None else options.max_workers
)
count, deadline, timeout = get_ping_param(options)
logger.debug(
"max-workers={}, count={}, deadline={}, timeout={}".format(
max_workers, count, deadline, timeout
)
)