From 79adf16931f9f7079f98fe7f58c6a67a7723c6c9 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Sat, 12 Sep 2020 15:25:04 +0100 Subject: bitbake: cooker/command: Fix disconnection handling After the recent init changes, if a client disconnects before issuing a command, the cooker can break in the reset handlers. Add some guards in the code to prevent this. (Bitbake rev: 12605e30e4c4e1ae6a67c97363b892ebf0b9566c) Signed-off-by: Richard Purdie --- bitbake/lib/bb/command.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'bitbake/lib/bb/command.py') diff --git a/bitbake/lib/bb/command.py b/bitbake/lib/bb/command.py index d4dcc653a0..f8c6a03bb9 100644 --- a/bitbake/lib/bb/command.py +++ b/bitbake/lib/bb/command.py @@ -143,7 +143,8 @@ class Command: self.cooker.finishcommand() def reset(self): - self.remotedatastores = bb.remotedata.RemoteDatastores(self.cooker) + if self.remotedatastores: + self.remotedatastores = bb.remotedata.RemoteDatastores(self.cooker) class CommandsSync: """ -- cgit v1.2.3-54-g00ecf