]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
lock.py: handle statuses with no description 551/head
authorDan Mick <dan.mick@redhat.com>
Mon, 29 Jun 2015 21:30:43 +0000 (14:30 -0700)
committerDan Mick <dan.mick@redhat.com>
Mon, 29 Jun 2015 21:31:26 +0000 (14:31 -0700)
Signed-off-by: Dan Mick <dan.mick@redhat.com>
teuthology/lock.py

index 9b5796669afcd5b4f9521e86b4aa68d97b6a6966..5f681064008c529e426ad2a31cf4fcfa3672bd60 100644 (file)
@@ -255,7 +255,8 @@ def main(ctx):
                                 lambda s: s['locked'] == (ctx.locked == 'true'))
             statuses = winnow(statuses, ctx.desc, 'description')
             statuses = winnow(statuses, ctx.desc_pattern, 'description',
-                              lambda s: ctx.desc_pattern in s['description'])
+                              lambda s: s['description'] and \
+                                        ctx.desc_pattern in s['description'])
             if ctx.json_query:
                 statuses = json_matching_statuses(ctx.json_query, statuses)
             statuses = winnow(statuses, ctx.os_type, 'os_type')