Correctly encode 'keyhome' into a gpg command.

This commit is contained in:
Taylor Hornby 2013-10-08 17:00:55 -06:00
parent c04db9c35f
commit ffaee4c577
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():