]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
lock.py: sort --brief output by status['name'] 320/head
authorDan Mick <dan.mick@inktank.com>
Tue, 26 Aug 2014 21:25:02 +0000 (14:25 -0700)
committerDan Mick <dan.mick@inktank.com>
Tue, 26 Aug 2014 21:25:02 +0000 (14:25 -0700)
Signed-off-by: Dan Mick <dan.mick@inktank.com>
teuthology/lock.py

index c210f6a4d8b822a3c7034fbd37ea9f8e72e28908..b93d5715153e60fdac640439366b5b91c1ca7c07 100644 (file)
@@ -136,7 +136,7 @@ def main(ctx):
                     print json.dumps(statuses, indent=4)
 
             elif ctx.brief:
-                for s in statuses:
+                for s in sorted(statuses, key=lambda s: s.get('name')):
                     locked = "un" if s['locked'] == 0 else "  "
                     mo = re.match('\w+@(\w+?)\..*', s['name'])
                     host = mo.group(1) if mo else s['name']