cmd = ['/usr/bin/gpg', '--batch', '--no-tty', '--decrypt']
gpg_run = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, close_fds=True)
try:
- d_stdout, d_stderr = gpg_run.communicate(buf.encode('utf-8'))
+ d_stdout, d_stderr = gpg_run.communicate(buf.decode().encode('utf-8'))
except OSError as e:
log.error("gnupg run, does gpg binary exist? : %s" % e)
raise
cmd = ['/usr/bin/gpg', '--batch', '--no-tty', '--decrypt']
gpg_run = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, close_fds=True)
try:
- d_stdout, d_stderr = gpg_run.communicate(buf.encode('utf-8'))
+ d_stdout, d_stderr = gpg_run.communicate(buf.decode().encode('utf-8'))
except OSError as e:
log.error("gnupg run failed, does gpg binary exist? : %s" % e)
raise
# TODO: check for gpg return code!
gpg_run = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, close_fds=True)
try:
- d_stdout, d_stderr = gpg_run.communicate(buf.encode('utf-8'))
+ d_stdout, d_stderr = gpg_run.communicate(buf.decode().encode('utf-8'))
except OSError as e:
log.error("gnupg signing failed, does gpg binary exist? : %s" % e)
raise