From 2da73ed3882480978c6c984741612ab0e7fe18db Mon Sep 17 00:00:00 2001 From: Joshua Lock Date: Thu, 28 Jul 2011 17:27:03 -0700 Subject: 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 Signed-off-by: Richard Purdie --- bitbake/lib/bb/ui/crumbs/configurator.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'bitbake/lib') diff --git a/bitbake/lib/bb/ui/crumbs/configurator.py b/bitbake/lib/bb/ui/crumbs/configurator.py index e558c955b3..e17d5559ff 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 -- cgit v1.2.3-54-g00ecf