]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
lock: tolerate description of None
authorSage Weil <sage@inktank.com>
Tue, 12 Mar 2013 16:49:42 +0000 (09:49 -0700)
committerSage Weil <sage@inktank.com>
Wed, 13 Mar 2013 02:50:07 +0000 (19:50 -0700)
Signed-off-by: Sage Weil <sage@inktank.com>
teuthology/lock.py

index 3c092f6a7a4f12d87b2759addcb4624a03086460..4e89ebf440ec8cb8225527140214136411a7cf3f 100644 (file)
@@ -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: