From c10378318712c92c3c2d9ba96607248034dcf275 Mon Sep 17 00:00:00 2001 From: shangdehao1 Date: Sat, 14 Dec 2019 14:28:43 +0800 Subject: [PATCH] task/install: fix UnboundLocalError of local variable repos If overrides is None, repos will don't be assignmented. In this case, will occur error "UnboundLocalError: local variable repos referenced before assignment" Signed-off-by: dehao.shang@intel.com --- teuthology/task/install/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/teuthology/task/install/__init__.py b/teuthology/task/install/__init__.py index dac97d4928..8ad6cd4335 100644 --- a/teuthology/task/install/__init__.py +++ b/teuthology/task/install/__init__.py @@ -541,6 +541,7 @@ def task(ctx, config): project, = config.get('project', 'ceph'), log.debug('project %s' % project) overrides = ctx.config.get('overrides') + repos = None if overrides: install_overrides = overrides.get('install', {}) teuthology.deep_merge(config, install_overrides.get(project, {})) -- 2.39.5