]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
cooker: add shutdown/stop methods
authorChris Larson <chris_larson@mentor.com>
Wed, 8 Dec 2010 20:08:18 +0000 (15:08 -0500)
committerChris Larson <chris_larson@mentor.com>
Thu, 9 Dec 2010 00:12:49 +0000 (19:12 -0500)
Signed-off-by: Chris Larson <chris_larson@mentor.com>
lib/bb/command.py
lib/bb/cooker.py

index 654ede0e855545649a57961abe1201b0c56bf805..30c7240cf2bb41ffa350b2691a37b5c4d9637395 100644 (file)
@@ -124,13 +124,13 @@ class CommandsSync:
         """
         Trigger cooker 'shutdown' mode
         """
-        command.cooker.state = bb.cooker.state.shutdown
+        command.cooker.shutdown()
 
     def stateStop(self, command, params):
         """
         Stop the cooker
         """
-        command.cooker.state = bb.cooker.state.stop
+        command.cooker.stop()
 
     def getCmdLineAction(self, command, params):
         """
index 4e6ff73b6a3d0c1fc329892f1d2c11c7e0828461..1c01ebe6cf84b010c83e3be0627eebe22e309727 100644 (file)
@@ -921,6 +921,12 @@ class BBCooker:
 
         bb.event.fire(CookerExit(), self.configuration.event_data)
 
+    def shutdown(self):
+        self.state = state.shutdown
+
+    def stop(self):
+        self.state = state.stop
+
 class CookerExit(bb.event.Event):
     """
     Notify clients of the Cooker shutdown