Fix potential UnicodeEncodeError in gen_key_input().

fix/89-python3
Isis Lovecruft 2015-03-10 01:26:16 +00:00
parent b970917701
commit 4be6fb75e3
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 str(val).strip():
if type(u'')(val).strip():
parms[key] = val
## if Key-Type is 'default', make Subkey-Type also be 'default'