From ef627d0ab8f5cf2fc72005393e76047cb623ff3d Mon Sep 17 00:00:00 2001 From: Michael Wood Date: Thu, 21 Jul 2016 14:43:27 +0100 Subject: bitbake: toaster: Replace references to LayerSource models Replace references to the now deprecated layersource models across Toaster with the new enums for layer source types. (Bitbake rev: 48c09c62eb979d840132e58144f0d81ffee675b1) Signed-off-by: Michael Wood Signed-off-by: Elliot Smith Signed-off-by: Richard Purdie --- bitbake/lib/toaster/orm/models.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'bitbake/lib/toaster/orm/models.py') diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py index 1daec9c25a..34ea28c270 100644 --- a/bitbake/lib/toaster/orm/models.py +++ b/bitbake/lib/toaster/orm/models.py @@ -1287,6 +1287,14 @@ class LayerSource(object): (TYPE_BUILD, "build"), ) + def types_dict(): + """ Turn the TYPES enums into a simple dictionary """ + dictionary = {} + for key in LayerSource.__dict__: + if "TYPE" in key: + dictionary[key] = getattr(LayerSource, key) + return dictionary + class Layer(models.Model): -- cgit v1.2.3-54-g00ecf