]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
Success of test may not have been set yet.
authorJosh Durgin <josh.durgin@dreamhost.com>
Tue, 12 Jul 2011 00:34:36 +0000 (17:34 -0700)
committerJosh Durgin <josh.durgin@dreamhost.com>
Tue, 12 Jul 2011 01:00:12 +0000 (18:00 -0700)
teuthology/task/internal.py

index 4c8341f9a79d810158fddc6c283a3c9381c28fe3..fd90f7b665e3413a3a73f3a8cca0da2286eb3a43 100644 (file)
@@ -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)