Adapt to python 3

This commit adapt stackviz to python 3. We have no tests yet, though.

Change-Id: Ie6e9296c3e19ddcfe202dbf688bb1704d0072722
This commit is contained in:
Masayuki Igawa 2016-06-14 16:01:02 +09:00 committed by Tim Buckley
parent 56ed584627
commit 226f2021d3
2 changed files with 3 additions and 3 deletions

View File

@ -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',

View File

@ -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()}