3
•7&jk ã @ s¢ d dl mZ d dlZd dlZd dlZd dlZd dlZd dlZd dlZd dl Z d dl
mZ dZd dl
mZmZmZmZmZmZ dd„ Zddd „Zd
d„ Zdd
„ ZdS )é )Úprint_functionN)Údefaultdictz
dnssec-keymgr)ÚdnskeyÚkeydictÚ keyseriesÚpolicyÚparsetabÚutilsc O s t | |Ž tjdƒ d S )Né )ÚprintÚsysÚexit)ÚargsÚkwargs© r ú/usr/lib/python3.6/keymgr.pyÚfatal s
r c C s† |}| s(t jj|ƒ s(t j|t jƒ r‚t jd }|s>t jj}xB|jt jƒD ]2}|t j | }t jj|ƒrzt j|t jƒrzP d}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ÚdefaultZfpathr Z directoryr r r Úset_path s $
r c C sÊ t dtjjtjdƒdƒƒ} t dtjjtjdƒdƒƒ}tjtd d�}|j dt
ddd;d� |j dd
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