From e69cf0b1b77936f6f54dcd7b44bb6a76b0e51e9c Mon Sep 17 00:00:00 2001 From: Josh Durgin Date: Mon, 11 Jul 2011 17:34:36 -0700 Subject: [PATCH] Success of test may not have been set yet. --- teuthology/task/internal.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/teuthology/task/internal.py b/teuthology/task/internal.py index 4c8341f9a79..fd90f7b665e 100644 --- a/teuthology/task/internal.py +++ b/teuthology/task/internal.py @@ -70,7 +70,7 @@ def lock_machines(ctx, config): try: yield finally: - if ctx.summary['success'] or not ctx.keep_locked_on_error: + if not ctx.keep_locked_on_error or ctx.summary.get('success', False): log.info('Unlocking machines...') for machine in ctx.config['targets']: lock.unlock(ctx, machine, ctx.owner)