wotmate
wotmate copied to clipboard
./make-sqlitedb.py fails with 'UNIQUE constraint failed: pub.keyid'
$ git describe
v0.1-8-g4f8f24a
$ ./make-sqlitedb.py
Initializing new sqlite3 db with metadata version 1
Loading all valid pubkeys
Traceback (most recent call last):
File "/home/us/neal/src/wotmate/./make-sqlitedb.py", line 236, in <module>
(pub_map, uid_map) = keyring_load_pub_uid(cursor, cmdargs.use_weak)
File "/home/us/neal/src/wotmate/./make-sqlitedb.py", line 54, in keyring_load_pub_uid
c.execute('INSERT INTO pub VALUES (?,?,?,?,?,?,?)', data)
sqlite3.IntegrityError: UNIQUE constraint failed: pub.keyid
I added a print(data) just before the data is inserted and I see:
$ ./make-sqlitedb.py
Initializing new sqlite3 db with metadata version 1
Loading all valid pubkeys
...
('872AA58E2C282883', 'u', '4096', '1', datetime.datetime(2014, 4, 9, 23, 2, 53), '', 'u')
...
('872AA58E2C282883', 'u', '4096', '1', datetime.datetime(2014, 4, 9, 23, 2, 53), '', 'u')
...
That key is reported twice by gpg --list-public-keys.