diff options
author | Joshua Lock <josh@linux.intel.com> | 2011-07-28 17:27:03 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-08-02 22:31:43 +0100 |
commit | 2da73ed3882480978c6c984741612ab0e7fe18db (patch) | |
tree | 3e77083843ea7fc89c09b0cb3261506aa177cddc /bitbake/lib/bb/ui | |
parent | fdece011d6e780ad55628cbb35b6580eca5d29d6 (diff) | |
download | ast2050-yocto-poky-2da73ed3882480978c6c984741612ab0e7fe18db.zip ast2050-yocto-poky-2da73ed3882480978c6c984741612ab0e7fe18db.tar.gz |
ui/crumbs/configurator: tweak addLayerConf return values
Use different return types when adding failed versus when the layer is
already enabled.
(Bitbake rev: 906854d75a12c8752efb1e4065eaf1a10b191612)
Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/ui')
-rw-r--r-- | bitbake/lib/bb/ui/crumbs/configurator.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/configurator.py b/bitbake/lib/bb/ui/crumbs/configurator.py index e558c95..e17d555 100644 --- a/bitbake/lib/bb/ui/crumbs/configurator.py +++ b/bitbake/lib/bb/ui/crumbs/configurator.py @@ -158,11 +158,14 @@ class Configurator(gobject.GObject): def addLayerConf(self, confpath): layerpath = self._splitLayer(confpath) name = self._getLayerName(layerpath) - if name not in self.enabled_layers: + + if not layerpath or not name: + return None, None + elif name not in self.enabled_layers: self.addLayer(name, layerpath) return name, layerpath else: - return None, None + return name, None def addLayer(self, name, path): self.enabled_layers[name] = path |