diff --git a/stackviz/export.py b/stackviz/export.py index b8bcab4..f1e0824 100644 --- a/stackviz/export.py +++ b/stackviz/export.py @@ -55,7 +55,7 @@ def open_compressed(output_dir, file_name, compress): else: open_func = open - return open_func(os.path.join(output_dir, file_name), 'wb'), file_name + return open_func(os.path.join(output_dir, file_name), 'w'), file_name def json_date_handler(object): @@ -195,7 +195,7 @@ def export_tempest(provider, output_dir, compress): def export_dstat(path, output_dir, compress): - f = open(path, 'rb') + f = open(path, 'r') out_stream, out_file = open_compressed( output_dir, 'dstat.csv', diff --git a/stackviz/parser/tempest_subunit.py b/stackviz/parser/tempest_subunit.py index 60a4198..8ac6933 100644 --- a/stackviz/parser/tempest_subunit.py +++ b/stackviz/parser/tempest_subunit.py @@ -222,7 +222,7 @@ def _strip(text): def _clean_details(details): - return {_strip(k): v.as_text() for k, v in details.iteritems() + return {_strip(k): v.as_text() for k, v in list(details.items()) if v.as_text()}