From: Alfredo Deza Date: Fri, 14 Mar 2014 18:44:22 +0000 (-0400) Subject: prevent undefined values in finally block X-Git-Tag: 1.1.0~1587^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F226%2Fhead;p=teuthology.git prevent undefined values in finally block Signed-off-by: Alfredo Deza --- 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...')