(self, gpg)
Start parsing the results of a key import operation.

        :type gpg: :class:`gnupg.GPG`
        :param gpg: An instance of :class:`gnupg.GPG`.
Start parsing the results of a key import operation.
Start parsing the results of a key import operation .
def __init__(self, gpg):
        """Start parsing the results of a key import operation.

        :type gpg: :class:`gnupg.GPG`
        :param gpg: An instance of :class:`gnupg.GPG`.
        """
        self._gpg = gpg

        #: A map from GnuPG codes shown with the ``IMPORT_OK`` status message
        #: to their human-meaningful English equivalents.
        self._ok_reason = {'0': 'Not actually changed',
                           '1': 'Entirely new key',
                           '2': 'New user IDs',
                           '4': 'New signatures',
                           '8': 'New subkeys',
                           '16': 'Contains private key',
                           '17': 'Contains private key',}

        #: A map from GnuPG codes shown with the ``IMPORT_PROBLEM`` status
        #: message to their human-meaningful English equivalents.
        self._problem_reason = { '0': 'No specific reason given',
                                 '1': 'Invalid Certificate',
                                 '2': 'Issuer Certificate missing',
                                 '3': 'Certificate Chain too long',
                                 '4': 'Error storing certificate', }

        #: All the possible status messages pertaining to actions taken while
        #: importing a key.
        self._fields = '''count no_user_id imported imported_rsa unchanged
        n_uids n_subk n_sigs n_revoc sec_read sec_imported sec_dups
        not_imported'''.split()

        #: Counts of all the status message results, :data:`_fields` which
        #: have appeared.
        self.counts = OrderedDict(
            zip(self._fields, [int(0) for x in range(len(self._fields))]))

        #: A list of strings containing the fingerprints of the GnuPG keyIDs
        #: imported.
        self.fingerprints = list()

        #: A list containing dictionaries with information gathered on keys
        #: imported.
        self.results = list()
def __init__ ( self , gpg ) : self . _gpg = gpg #: A map from GnuPG codes shown with the ``IMPORT_OK`` status message #: to their human-meaningful English equivalents. self . _ok_reason = { '0' : 'Not actually changed' , '1' : 'Entirely new key' , '2' : 'New user IDs' , '4' : 'New signatures' , '8' : 'New subkeys' , '16' : 'Contains private key' , '17' : 'Contains private key' , } #: A map from GnuPG codes shown with the ``IMPORT_PROBLEM`` status #: message to their human-meaningful English equivalents. self . _problem_reason = { '0' : 'No specific reason given' , '1' : 'Invalid Certificate' , '2' : 'Issuer Certificate missing' , '3' : 'Certificate Chain too long' , '4' : 'Error storing certificate' , } #: All the possible status messages pertaining to actions taken while #: importing a key. self . _fields = '''count no_user_id imported imported_rsa unchanged
        n_uids n_subk n_sigs n_revoc sec_read sec_imported sec_dups
        not_imported''' . split ( ) #: Counts of all the status message results, :data:`_fields` which #: have appeared. self . counts = OrderedDict ( zip ( self . _fields , [ int ( 0 ) for x in range ( len ( self . _fields ) ) ] ) ) #: A list of strings containing the fingerprints of the GnuPG keyIDs #: imported. self . fingerprints = list ( ) #: A list containing dictionaries with information gathered on keys #: imported. self . results = list ( )