Adding a key on a non-English system does not fail any longer

This commit is contained in:
fkrone 2015-01-04 17:54:44 +01:00
parent 463b5dbe7a
commit 64db1a6bc0

View file

@ -48,7 +48,9 @@ def confirm_key( content, email ):
break
os.mkdir(tmpkeyhome)
p = subprocess.Popen( ['/usr/bin/gpg', '--homedir', tmpkeyhome, '--import', '--batch'], stdin=subprocess.PIPE, stdout=subprocess.PIPE,stderr=subprocess.PIPE )
localized_env = os.environ.copy()
localized_env["LANG"] = "C"
p = subprocess.Popen( ['/usr/bin/gpg', '--homedir', tmpkeyhome, '--import', '--batch'], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=localized_env )
result = p.communicate(input=content)[1]
confirmed = False