diff options
| author | Michael Wood <michael.g.wood@intel.com> | 2016-07-21 14:43:27 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-07-26 08:10:36 +0100 |
| commit | ef627d0ab8f5cf2fc72005393e76047cb623ff3d (patch) | |
| tree | ae0067545010621d688baea77197ec50c7db7acc /bitbake/lib/toaster/orm | |
| parent | ffc78d329d6fed9ae9a0db470d30033069b42f8f (diff) | |
| download | poky-ef627d0ab8f5cf2fc72005393e76047cb623ff3d.tar.gz | |
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 <michael.g.wood@intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/orm')
| -rw-r--r-- | bitbake/lib/toaster/orm/models.py | 8 |
1 files changed, 8 insertions, 0 deletions
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): | |||
| 1287 | (TYPE_BUILD, "build"), | 1287 | (TYPE_BUILD, "build"), |
| 1288 | ) | 1288 | ) |
| 1289 | 1289 | ||
| 1290 | def types_dict(): | ||
| 1291 | """ Turn the TYPES enums into a simple dictionary """ | ||
| 1292 | dictionary = {} | ||
| 1293 | for key in LayerSource.__dict__: | ||
| 1294 | if "TYPE" in key: | ||
| 1295 | dictionary[key] = getattr(LayerSource, key) | ||
| 1296 | return dictionary | ||
| 1297 | |||
| 1290 | 1298 | ||
| 1291 | class Layer(models.Model): | 1299 | class Layer(models.Model): |
| 1292 | 1300 | ||
