From 57c8fd96871bd478b5de86e512f4cde59ade132f Mon Sep 17 00:00:00 2001 From: Alfredo Deza Date: Fri, 14 Mar 2014 14:44:22 -0400 Subject: [PATCH] prevent undefined values in finally block Signed-off-by: Alfredo Deza --- teuthology/task/ceph-deploy.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/teuthology/task/ceph-deploy.py b/teuthology/task/ceph-deploy.py index 287b9c8c2..aec9d1b2c 100644 --- a/teuthology/task/ceph-deploy.py +++ b/teuthology/task/ceph-deploy.py @@ -393,6 +393,11 @@ def build_ceph_cluster(ctx, config): teuthology.pull_directory(remote, '/var/log/ceph', os.path.join(sub, 'log')) + # Prevent these from being undefined if the try block fails + all_nodes = get_all_nodes(ctx, config) + purge_nodes = './ceph-deploy purge'+" "+all_nodes + purgedata_nodes = './ceph-deploy purgedata'+" "+all_nodes + log.info('Purging package...') execute_ceph_deploy(ctx, config, purge_nodes) log.info('Purging data...') -- 2.47.3