Fix UnicodeDecodeError in gen_key() when run with PyPy.

* FIXES #101:
   https://github.com/isislovecruft/python-gnupg/issues/101
fix/101-pypy-gen-key
Isis Lovecruft 2015-03-18 05:00:00 +00:00
parent 917a3dcd89
commit 5895997554
No known key found for this signature in database
GPG Key ID: 18C16EC5F9F1D673
1 changed files with 1 additions and 1 deletions

View File

@ -801,7 +801,7 @@ class GPG(GPGBase):
key = key.replace('_','-').title()
## to set 'cert', 'Key-Usage' must be blank string
if not key in ('Key-Usage', 'Subkey-Usage'):
if type(u'')(val).strip():
if type('')(val).strip():
parms[key] = val
## if Key-Type is 'default', make Subkey-Type also be 'default'