null+****@clear*****
null+****@clear*****
2012年 5月 21日 (月) 11:23:59 JST
Kouhei Sutou 2012-05-21 11:23:59 +0900 (Mon, 21 May 2012)
New Revision: f4cd3500578d7e8838a3409c194bfab29a7a0e14
Log:
doc: normalized start time and elapsed time for non pretty printed output
Modified files:
doc/update_execution_example.py
Modified: doc/update_execution_example.py (+4 -3)
===================================================================
--- doc/update_execution_example.py 2012-05-21 11:23:40 +0900 (1ef4f3a)
+++ doc/update_execution_example.py 2012-05-21 11:23:59 +0900 (1230f1f)
@@ -70,11 +70,12 @@ def execmd(command, fout):
else:
output_buffer += char
if char == '\n':
+ parsed_output = json.loads(output_buffer)
+ normalized_output = normalize_output(parsed_output)
if len(output_buffer) < 80:
- formatted_output = output_buffer
+ formatted_output = json.dumps(normalized_output,
+ ensure_ascii=False)
else:
- parsed_output = json.loads(output_buffer)
- normalized_output = normalize_output(parsed_output)
formatted_output = json.dumps(normalized_output,
indent=2,
ensure_ascii=False)