Merge lp:~pwlars/lava-test/json-formatting into lp:lava-test/0.0

Proposed by Paul Larson
Status: Merged
Merged at revision: 41
Proposed branch: lp:~pwlars/lava-test/json-formatting
Merge into: lp:lava-test/0.0
Diff against target: 25 lines (+2/-2)
2 files modified
abrek/dashboard.py (+1/-1)
abrek/testdef.py (+1/-1)
To merge this branch: bzr merge lp:~pwlars/lava-test/json-formatting
Reviewer Review Type Date Requested Status
Zygmunt Krynicki (community) Approve
Review via email: mp+37812@code.launchpad.net

Description of the change

Simple change to make json output more human readable

To post a comment you must log in.
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

Looks good!

Do you have any tests that would be broken by the change of default output format?

review: Approve
Revision history for this message
Paul Larson (pwlars) wrote :

> Looks good!
>
> Do you have any tests that would be broken by the change of default output
> format?
Nope, tests are fine with it.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'abrek/dashboard.py'
2--- abrek/dashboard.py 2010-09-28 18:53:14 +0000
3+++ abrek/dashboard.py 2010-10-07 03:03:39 +0000
4@@ -127,7 +127,7 @@
5 print "You must specify a result"
6 sys.exit(1)
7 bundle = generate_bundle(self.args[0])
8- print json.dumps(bundle)
9+ print json.dumps(bundle, indent=2)
10
11
12 def generate_bundle(result):
13
14=== modified file 'abrek/testdef.py'
15--- abrek/testdef.py 2010-09-28 18:07:30 +0000
16+++ abrek/testdef.py 2010-10-07 03:03:39 +0000
17@@ -106,7 +106,7 @@
18 sw = swprofile.get_sw_context()
19 test_runs[0]['sw_context'] = sw
20 testdata['test_runs'] = test_runs
21- write_file(json.dumps(testdata), filename)
22+ write_file(json.dumps(testdata, indent=2), filename)
23
24 def run(self, quiet=False):
25 if not self.runner:

Subscribers

People subscribed via source and target branches