gpg: fix small Python2/3 issue

nistp521
Roman Zeyde 8 years ago
parent 749799845d
commit 8265515641

@ -25,7 +25,7 @@ def yield_connections(sock):
def serialize(data):
"""Serialize data according to ASSUAN protocol."""
for c in [b'%', b'\n', b'\r']:
escaped = '%{:02X}'.format(c[0]).encode('ascii')
escaped = '%{:02X}'.format(ord(c)).encode('ascii')
data = data.replace(c, escaped)
return data

Loading…
Cancel
Save