fix bugs and 2.6 compatibility
diff --git a/wally/report.py b/wally/report.py
index 6164cae..85ac388 100644
--- a/wally/report.py
+++ b/wally/report.py
@@ -1,5 +1,6 @@
import os
import bisect
+import logging
import wally
from wally import charts
@@ -8,6 +9,9 @@
from wally.meta_info import total_lab_info, collect_lab_data
+logger = logging.getLogger("wally.report")
+
+
def render_html(dest, info, lab_description):
very_root_dir = os.path.dirname(os.path.dirname(wally.__file__))
templ_dir = os.path.join(very_root_dir, 'report_templates')
@@ -159,7 +163,12 @@
"processor_count": "None"
}
- processed_results = process_disk_info(results)
- make_plots(processed_results, path)
- di = get_disk_info(processed_results)
- render_html(path, di, lab_info)
+ try:
+ processed_results = process_disk_info(results)
+ make_plots(processed_results, path)
+ di = get_disk_info(processed_results)
+ render_html(path, di, lab_info)
+ except Exception as exc:
+ logger.error("Failed to generate html report:" + exc.message)
+ else:
+ logger.info("Html report were stored in " + path)