3 9Pe@sJddlZddlZddlZddlmZmZGdddeZGdddZdS)N)PopenPIPEc@s eZdZdS)KeyZoneExceptionN)__name__ __module__ __qualname__rr/usr/lib/python3.6/keyzone.pyrsrc@seZdZdZddZdS)keyzonez/reads a zone file to find data relevant to keysc Csd|_d|_|sdS| s8tjj| s8tj|tj rDtddSd}}t|dd||gt t dj \}}xv|j D]j}t |t k r|jd}tjd|rqv|j} | st| d|krt| d}| dd krvt| d}qvW||_||_dS) Nz"named-compilezone" not foundz-o-)stdoutstderrasciiz ^[:space:]*;ZDNSKEY)maxttlkeyttlospathisfileaccessX_OKrrrZ communicate splitlinestypestrdecoderesearchsplitint) selfnamefilenameZczpathrrfp_lineZfieldsrrr __init__s.     zkeyzone.__init__N)rrr__doc__r&rrrr r sr ) rsysr subprocessrr Exceptionrr rrrr  s