Merge "write byte objects when using os.write"

This commit is contained in:
Zuul 2018-05-18 14:30:31 +00:00 committed by Gerrit Code Review
commit cd96627760
1 changed files with 2 additions and 2 deletions

View File

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