From fd1e083c619ed270c62391184129c4cf35f72890 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 12 Mar 2013 09:49:42 -0700 Subject: [PATCH] lock: tolerate description of None Signed-off-by: Sage Weil --- teuthology/lock.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/teuthology/lock.py b/teuthology/lock.py index 3c092f6a7a..4e89ebf440 100644 --- a/teuthology/lock.py +++ b/teuthology/lock.py @@ -299,7 +299,8 @@ Lock, unlock, or query lock status of machines. if status['description'] == ctx.desc] if ctx.desc_pattern is not None: statuses = [status for status in statuses \ - if status['description'].find(ctx.desc_pattern) >= 0] + if status['description'] is not None and \ + status['description'].find(ctx.desc_pattern) >= 0] if ctx.list: if ctx.brief: for s in statuses: -- 2.39.5