summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/cooker.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2020-09-12 15:25:04 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-09-12 15:29:56 +0100
commit79adf16931f9f7079f98fe7f58c6a67a7723c6c9 (patch)
treebffe3214d383d63f9b828434310ddfde5a031c7d /bitbake/lib/bb/cooker.py
parent909a9f5e8e6dd5c4587d42a83d849c77d88476d9 (diff)
downloadpoky-79adf16931f9f7079f98fe7f58c6a67a7723c6c9.tar.gz
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 <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/cooker.py')
-rw-r--r--bitbake/lib/bb/cooker.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index e45755206e..58c223c1ca 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -1703,8 +1703,9 @@ class BBCooker:
1703 self.finishcommand() 1703 self.finishcommand()
1704 self.extraconfigdata = {} 1704 self.extraconfigdata = {}
1705 self.command.reset() 1705 self.command.reset()
1706 self.databuilder.reset() 1706 if hasattr(self, "data"):
1707 self.data = self.databuilder.data 1707 self.databuilder.reset()
1708 self.data = self.databuilder.data
1708 self.parsecache_valid = False 1709 self.parsecache_valid = False
1709 self.baseconfig_valid = False 1710 self.baseconfig_valid = False
1710 1711