[openpgp] Bugfixes

- dont pass Path instance to sqlite3.connect()
- add keydate to devicelist publish
This commit is contained in:
Philipp Hörist
2018-09-09 16:19:37 +02:00
parent 585e5666e6
commit 37105a881d
2 changed files with 2 additions and 3 deletions

View File

@@ -36,7 +36,7 @@ TABLE_LAYOUT = '''
class Storage:
def __init__(self, folder_path):
self._con = sqlite3.connect(folder_path / 'contacts.db',
self._con = sqlite3.connect(str(folder_path / 'contacts.db'),
detect_types=sqlite3.PARSE_DECLTYPES)
self._con.row_factory = self._namedtuple_factory
self._create_database()

View File

@@ -32,7 +32,6 @@ from openpgp.modules.util import NS_OPENPGP_PUBLIC_KEYS
from openpgp.modules.util import NS_OPENPGP
from openpgp.modules.util import Key
from openpgp.modules.util import Trust
from openpgp.modules.util import VerifyFailed
from openpgp.modules.util import DecryptionFailed
from openpgp.backend.sql import Storage
from openpgp.backend.pygpg import PGPContext
@@ -412,7 +411,7 @@ class OpenPGP:
return
log.info('Own key not published')
if self._fingerprint is not None:
keylist.append(Key(self._fingerprint, None))
keylist.append(Key(self._fingerprint, self._date))
self._publish_key_list(keylist)
return