summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/cooker.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/cooker.py')
-rw-r--r--bitbake/lib/bb/cooker.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 5ceb198c05..edceca00ed 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -67,6 +67,14 @@ class CollectionError(bb.BBHandledException):
67class state: 67class state:
68 initial, parsing, running, shutdown, forceshutdown, stopped, error = range(7) 68 initial, parsing, running, shutdown, forceshutdown, stopped, error = range(7)
69 69
70 @classmethod
71 def get_name(cls, code):
72 for name in dir(cls):
73 value = getattr(cls, name)
74 if type(value) == type(cls.initial) and value == code:
75 return name
76 raise ValueError("Invalid status code: %s" % code)
77
70 78
71class SkippedPackage: 79class SkippedPackage:
72 def __init__(self, info = None, reason = None): 80 def __init__(self, info = None, reason = None):