Ensure that manager.py exits cleanly if charm closes socket

In the related bug, the manager.py was crashing as it received
(essentially) a socket close which resulted in no data being received.
This wasn't handled properly resulting in a crash in the manager.py.
This change simply allows the manager.py to exit cleanly, and the charm
can restart it if it needs to.

Change-Id: I76a435f48cdb8c201b0ddc529da947e6ed9ec031
Related-Bug: #1822063
This commit is contained in:
Alex Kavanagh 2019-03-28 15:56:18 +00:00
parent ce613b3c35
commit 299a952003
1 changed files with 1 additions and 1 deletions

View File

@ -548,7 +548,7 @@ if __name__ == '__main__':
while True:
try:
data = uds_client.receive()
if data == "QUIT":
if data == "QUIT" or data is None:
break
spec = json.loads(data)
manager = get_manager(