"print(r)" use single quotes for dictionary keys. Using json.dumps
makes sure that we produce valid JSON, and that is useful from tests.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
I have not yet posted the test that uses this trivial change,
but it is pretty obvious so I'm pushing it.
patchew-cli | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/patchew-cli b/patchew-cli
index 51a89c5..5369ae3 100755
--- a/patchew-cli
+++ b/patchew-cli
@@ -223,7 +223,7 @@ class ProjectCommand(SubCommand):
args = parser.parse_args(argv)
r = self.api_do("get-projects")
if args.raw:
- print(r)
+ print(json.dumps(r, indent=2, separators=",:"))
return 0
for p in r:
print(p["name"])
--
2.16.2
_______________________________________________
Patchew-devel mailing list
Patchew-devel@redhat.com
https://www.redhat.com/mailman/listinfo/patchew-devel