o !V1fD@sRddlZddlZddlZddlmZmZeeeZ de de ddfddZ dS)N) exceptionsutilsource_keyfiledestination_keyfilereturncCs@td|tj|stj|dt||t |ddS)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)rrr./usr/lib/python3/dist-packages/uaclient/gpg.pyexport_gpg_key s   r) loggingr ruaclientrr getLoggerreplace_top_level_logger_name__name__rstrrrrrrs