diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2018-03-06 15:16:12 -0800 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2018-03-06 15:16:12 -0800 |
commit | 858c7bca401565b63851d78a8591cdac80480080 (patch) | |
tree | 6bb5eb0bc02bf89b1049a23f4afff47701b32312 /tests | |
parent | d47ffba75d26cc599c790be9de35c37681fb70e7 (diff) |
Use urwid.util.detected_encoding instead of try_decode
Commands running in a subprocess should return the terminal encoding so
we don't need to guess their encoding.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/crypto_test.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/crypto_test.py b/tests/crypto_test.py index f6c02a7e..25cce8ba 100644 --- a/tests/crypto_test.py +++ b/tests/crypto_test.py @@ -12,9 +12,9 @@ import unittest import gpg import mock +import urwid from alot import crypto -from alot import helper from alot.errors import GPGProblem, GPGCode from . import utilities @@ -58,8 +58,8 @@ def tearDownModule(): # Kill any gpg-agent's that have been opened lookfor = 'gpg-agent --homedir {}'.format(os.environ['GNUPGHOME']) - out = helper.try_decode( - subprocess.check_output(['ps', 'xo', 'pid,cmd'], stderr=DEVNULL)) + out = subprocess.check_output( + ['ps', 'xo', 'pid,cmd'], stderr=DEVNULL).decode(urwid.util.detected_encoding) for each in out.strip().split('\n'): pid, cmd = each.strip().split(' ', 1) if cmd.startswith(lookfor): |