write byte objects when using os.write

Change-Id: I184a9d0bf4a0ba0776d519b3a3b9ccd39151b4ae
Story: 2002052
Task: 19713
This commit is contained in:
Matthew Thode 2018-05-17 11:10:05 -05:00
parent de32d66ce3
commit a03661c4a8
No known key found for this signature in database
GPG Key ID: 64A37BEAAE19A4E8

View File

@ -146,13 +146,13 @@ class IronicPythonAgentHeartbeater(threading.Thread):
self.max_delay) self.max_delay)
def force_heartbeat(self): def force_heartbeat(self):
os.write(self.writer, 'b') os.write(self.writer, b'b')
def stop(self): def stop(self):
"""Stop the heartbeat thread.""" """Stop the heartbeat thread."""
if self.writer is not None: if self.writer is not None:
LOG.info('stopping heartbeater') LOG.info('stopping heartbeater')
os.write(self.writer, 'a') os.write(self.writer, b'a')
return self.join() return self.join()