Distinguish byte (python2 str type) and unicode strings (python 3 str type)
Python 3 strings are python 2 unicode strings. Therefore consistently mark strings that are sent via pipes or written/read to file as byte strings.
This commit is contained in:
parent
0d8d19437e
commit
e239820afd
4 changed files with 7 additions and 7 deletions
|
|
@ -264,7 +264,7 @@ def main():
|
|||
# their old stderr.
|
||||
ack_fd = int(opt.ack_fd)
|
||||
assert ack_fd > 2
|
||||
if os.write(ack_fd, 'REDO-OK\n') != 8:
|
||||
if os.write(ack_fd, b'REDO-OK\n') != 8:
|
||||
raise Exception('write to ack_fd returned wrong length')
|
||||
os.close(ack_fd)
|
||||
queue += targets
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue