test_gpg_binary_version_str failed for non-English

This patch sets the environment variable LANGUGE to 'en', meaning English translation is used for outputs. The string comparisons in test_gpg_binary_version_str failed otherwise when using a non-English locale. Another choice may be to set LANG=C to avoid locales all-in-all.
fix/24-enc-to-file
Mikael Nordfeldth 2013-07-29 00:18:52 +02:00
parent ce76fd130a
commit 314e670ada
1 changed files with 2 additions and 1 deletions

View File

@ -474,7 +474,8 @@ class GPGBase(object):
cmd = ' '.join(self._make_args(args, passphrase)) cmd = ' '.join(self._make_args(args, passphrase))
log.debug("Sending command to GnuPG process:%s%s" % (os.linesep, cmd)) log.debug("Sending command to GnuPG process:%s%s" % (os.linesep, cmd))
return subprocess.Popen(cmd, shell=True, stdin=subprocess.PIPE, return subprocess.Popen(cmd, shell=True, stdin=subprocess.PIPE,
stdout=subprocess.PIPE, stderr=subprocess.PIPE) stdout=subprocess.PIPE, stderr=subprocess.PIPE,
env={'LANGUAGE': 'en'})
def _read_response(self, stream, result): def _read_response(self, stream, result):
"""Reads all the stderr output from GPG, taking notice only of lines """Reads all the stderr output from GPG, taking notice only of lines