3 9Pek@sddlmZddlZddlZddlZddlZddlZddlZddlZddl Z ddl m Z dZ ddl mZmZmZmZmZmZddZddd Zd d Zd d ZdS))print_functionN) defaultdictz dnssec-keymgr)dnskeykeydict keyseriespolicyparsetabutilscOst||tjddS)N)printsysexit)argskwargsr/usr/lib/python3.6/keymgr.pyfatals rcCs|}| s(tjj| s(tj|tj rtjd}|s>tjj}xB|jtjD]2}|tj |}tjj|rztj|tjrzPd}qLW|S)a2 find the location of a specified command. If a default is supplied, exists and it's an executable, we use it; otherwise we search PATH for an alternative. :param command: command to look for :param default: default value to use :return: PATH with the location of a suitable binary PATHN) ospathisfileaccessX_OKenvirondefpathsplitpathsepsep)ZcommanddefaultZfpathrZ directoryrrrset_paths$ rcCstdtjjtjdd}tdtjjtjdd}tjtdd}|j dt ddd;d |j d d t ddd|j ddt ddd|j dd|t dd d|j ddt ddd d|j dd|t dd d|j d d!d"d#d$d%|j d&d'd"d#d(d%|j d)d*d+d"d#d s @   G