I've done a trivial attempt at reproducing this on testing (buster)¹ and
importing seems to work, so I have a couple of questions before I
investigate more in depth on a stretch.

On 2017-11-05 at 16:55:38 +0100, activityworkshop wrote:
> from gpg import GPG

is this a typo for ``from gnupg import GPG``? otherwise this is probably
not the right package (maybe python3-gpg?)

> gpg = GPG(gnupghome="/path/to/keyring")
> result = gpg.import_keys(strKey)
> 
> where strKey is a string containing a private key.

I've tried to reproduce it by exporting a secret key both by armouring
it and reading it as a string (``with open('somekey.asc') as fp: strKey
= fp.read()``) as well as exporting the same secret key unarmoured and
reading it as bytes (``with open('somekey.gpg', 'rb') as fp: strKey =
fp.read()``); which method are you using?

¹ the version currently in buster is more recent than the one in stable,
so that can easily be the reason for the non reproduction of this issue.

-- 
Elena ``of Valhalla''

Reply via email to