#NEWLINE# def import_conf( user , conf_dir , tarball , keyring , secret_keyring , auth_method , gpg_home_dir ) : #NEWLINE# #INDENT# '\n    Import the slave configuration from the tarball.\n    :param str auth: authentication method (ssl or simple)\n    :param str conf_dir: path to the debile configuration\n    :param str auth_method: authentication backend (ssl or simple)\n\n    ' #NEWLINE# with tarfile . open ( tarball , 'r:gz' ) as tf : #NEWLINE# #INDENT# name = get_attribute_from_tarfile ( 'name' , tf ) #NEWLINE# key = get_attribute_from_tarfile ( 'fingerprint' , tf ) #NEWLINE# write_conf ( conf_dir , name , key , auth_method ) #NEWLINE# import_pgp ( user , get_attribute_from_tarfile ( 'key.pub' , tf ) , 'public' , user , gpg_home_dir ) #NEWLINE# import_pgp ( user , get_attribute_from_tarfile ( 'key.priv' , tf ) , 'secret' , secret_keyring , gpg_home_dir )