!V1fDddlZddlZddlZddlmZmZej ejeZ de de ddfdZ y)N) exceptionsutilsource_keyfiledestination_keyfilereturnctjd|tjj |st j |tj||tj|dy)aXCopy a specific key from source_keyring_dir into destination_keyfile :param source_keyfile: Path of source keyring file to export. :param destination_keyfile: The filename created with the single exported key. :raise UbuntuProError: Any GPG errors or if specific key does not exist in the source_keyring_file. zExporting GPG key %s)keyfileiN) LOGdebugospathexistsrGPGKeyNotFoundshutilcopychmod)rrs ./usr/lib/python3/dist-packages/uaclient/gpg.pyexport_gpg_keyr sRII$n5 77>>. )''?? KK 34HH %() loggingr ruaclientrr getLoggerreplace_top_level_logger_name__name__r strrrrrsK %g:::8DE)3)S)T)r