UTF8 encode commands sent to executor socket

Required for python3.

Change-Id: I9c6f22dfb9548673684810c61d1a6d39c657552a
This commit is contained in:
James E. Blair 2017-06-08 14:32:03 -07:00
parent 16d96a02db
commit 04e6030f73
1 changed files with 2 additions and 1 deletions

View File

@ -71,7 +71,8 @@ class Executor(zuul.cmd.ZuulApp):
path = os.path.join(state_dir, 'executor.socket')
s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
s.connect(path)
s.sendall('%s\n' % cmd)
cmd = '%s\n' % cmd
s.sendall(cmd.encode('utf8'))
def exit_handler(self):
self.executor.stop()