From 1767b21e791c7eda2e4f7b7c03e65b3e1371f055 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 11 Jul 2011 14:49:53 -0700 Subject: [PATCH] print --lock-many result as yaml targets: stanza --- teuthology/lock.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/teuthology/lock.py b/teuthology/lock.py index 66912e3550a71..7d764b8b6b467 100644 --- a/teuthology/lock.py +++ b/teuthology/lock.py @@ -3,6 +3,7 @@ import httplib2 import json import logging import urllib +import yaml from teuthology import misc as teuthology @@ -221,7 +222,8 @@ Lock, unlock, or query lock status of machines. ret = 1 else: machines_to_update = result - print json.dumps(result, indent=4) + y = { 'targets': result } + print yaml.safe_dump(y, default_flow_style=False) elif ctx.update: assert ctx.desc is not None or ctx.status is not None, \ 'you must specify description or status to update' -- 2.39.5