Merge pull request #6 from defuse/master

Correctly encode 'keyhome' into a gpg command.
This commit is contained in:
Igor Rzegocki 2013-11-03 05:30:55 -08:00
commit 1f34081416
1 changed files with 2 additions and 2 deletions

View File

@ -2,8 +2,8 @@ import os
import subprocess
def public_keys( keyhome ):
cmd = '/usr/bin/gpg --homedir %s --list-keys --with-colons' % keyhome
p = subprocess.Popen( cmd.split(' '), stdin=None, stdout=subprocess.PIPE, stderr=subprocess.PIPE )
cmd = ['/usr/bin/gpg', '--homedir', keyhome, '--list-keys', '--with-colons']
p = subprocess.Popen( cmd, stdin=None, stdout=subprocess.PIPE, stderr=subprocess.PIPE )
p.wait()
keys = list()
for line in p.stdout.readlines():