You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
define encoding when communicating with the gpg-agent process
This fixes:
$ vault_from_gpg_agent.py --clear
Traceback (most recent call last):
File "/usr/local/bin/vault_from_gpg_agent.py", line 91, in <module>
main()
File "/usr/local/bin/vault_from_gpg_agent.py", line 85, in main
clear_passphrase(gpg_agent, cache_id)
File "/usr/local/bin/vault_from_gpg_agent.py", line 61, in clear_passphrase
stdout = gpg_agent.communicate("CLEAR_PASSPHRASE %s\n" % (cache_id,))[0]
File "/usr/lib/python3.7/subprocess.py", line 939, in communicate
stdout, stderr = self._communicate(input, endtime, timeout)
File "/usr/lib/python3.7/subprocess.py", line 1666, in _communicate
input_view = memoryview(self._input)
TypeError: memoryview: a bytes-like object is required, not 'str'
I set the encoding='utf8' when doing the `Popen`. As long as only ascii
characters get passed back and forth we should be safe.
0 commit comments