aboutsummaryrefslogtreecommitdiffstats
path: root/layerindex/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'layerindex/utils.py')
-rw-r--r--layerindex/utils.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/layerindex/utils.py b/layerindex/utils.py
index f8c5fd4560..c30038da26 100644
--- a/layerindex/utils.py
+++ b/layerindex/utils.py
@@ -371,10 +371,11 @@ def setup_core_layer_sys_path(settings, branchname):
"""
core_layer = get_layer(settings.CORE_LAYER_NAME)
core_layerbranch = core_layer.get_layerbranch(branchname)
- core_urldir = core_layer.get_fetch_dir()
- core_repodir = os.path.join(settings.LAYER_FETCH_DIR, core_urldir)
- core_layerdir = os.path.join(core_repodir, core_layerbranch.vcs_subdir)
- sys.path.insert(0, os.path.join(core_layerdir, 'lib'))
+ if core_layerbranch:
+ core_urldir = core_layer.get_fetch_dir()
+ core_repodir = os.path.join(settings.LAYER_FETCH_DIR, core_urldir)
+ core_layerdir = os.path.join(core_repodir, core_layerbranch.vcs_subdir)
+ sys.path.insert(0, os.path.join(core_layerdir, 'lib'))
def run_command_interruptible(cmd):
"""