diff options
author | Ruben Pollan <meskio@sindominio.net> | 2014-11-10 09:50:56 -0600 |
---|---|---|
committer | Ruben Pollan <meskio@sindominio.net> | 2014-11-10 13:41:28 -0600 |
commit | 22a16674ce6891de5ea0a9cbea38ddabc9dd6e06 (patch) | |
tree | 99c14f06cebcc3f8e55bbdb5b962771244cf919f /src/leap/keymanager/openpgp.py | |
parent | d1e0322d8c12dfb1511ad0895c5fc1e0271b8a30 (diff) |
Use type instead of tags to get docs in openpgp
For that that now the type is the class.__name__ instead of
str(class)
Diffstat (limited to 'src/leap/keymanager/openpgp.py')
-rw-r--r-- | src/leap/keymanager/openpgp.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/leap/keymanager/openpgp.py b/src/leap/keymanager/openpgp.py index 1160434c..38db178c 100644 --- a/src/leap/keymanager/openpgp.py +++ b/src/leap/keymanager/openpgp.py @@ -36,8 +36,7 @@ from leap.keymanager.keys import ( EncryptionScheme, is_address, build_key_from_dict, - KEYMANAGER_KEY_TAG, - TAGS_ADDRESS_PRIVATE_INDEX, + TYPE_ADDRESS_PRIVATE_INDEX, KEY_FINGERPRINT_KEY, KEY_DATA_KEY, ) @@ -210,6 +209,9 @@ class OpenPGPScheme(EncryptionScheme): signing and verification). """ + # type used on the soledad documents + OPENPGP_KEY_TYPE = OpenPGPKey.__name__ + def __init__(self, soledad, gpgbinary=None): """ Initialize the OpenPGP wrapper. @@ -427,8 +429,8 @@ class OpenPGPScheme(EncryptionScheme): :rtype: leap.soledad.document.SoledadDocument """ doclist = self._soledad.get_from_index( - TAGS_ADDRESS_PRIVATE_INDEX, - KEYMANAGER_KEY_TAG, + TYPE_ADDRESS_PRIVATE_INDEX, + self.OPENPGP_KEY_TYPE, address, '1' if private else '0') if len(doclist) is 0: |