grthtrhthjhtyjytjytkergtrhtrjytjerhrfh3 «Ú²jkã@s¢ddlmZddlZddlZddlZddlZddlZddlZddlZddl Z ddl m Z dZ ddl mZmZmZmZmZmZdd„Zddd „Zd d „Zd d „ZdS)é)Úprint_functionN)Ú defaultdictz dnssec-keymgr)ÚdnskeyÚkeydictÚ keyseriesÚpolicyÚparsetabÚutilscOst||ŽtjdƒdS)Né)ÚprintÚsysÚexit)ÚargsÚkwargs©rú/usr/lib/python3.6/keymgr.pyÚfatals rcCs†|}| s(tjj|ƒ s(tj|tjƒ r‚tjd}|s>tjj}xB|jtjƒD]2}|tj |}tjj|ƒrztj|tjƒrzPd}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) ÚosÚpathÚisfileÚaccessÚX_OKÚenvironÚdefpathÚsplitÚpathsepÚsep)ZcommandÚdefaultZfpathrZ directoryrrrÚset_paths$ rcCsÊtdtjjtjdƒdƒƒ}tdtjjtjdƒdƒƒ}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