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:
parent
56ed584627
commit
226f2021d3
@ -55,7 +55,7 @@ def open_compressed(output_dir, file_name, compress):
|
|||||||
else:
|
else:
|
||||||
open_func = open
|
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):
|
def json_date_handler(object):
|
||||||
@ -195,7 +195,7 @@ def export_tempest(provider, output_dir, compress):
|
|||||||
|
|
||||||
|
|
||||||
def export_dstat(path, output_dir, compress):
|
def export_dstat(path, output_dir, compress):
|
||||||
f = open(path, 'rb')
|
f = open(path, 'r')
|
||||||
out_stream, out_file = open_compressed(
|
out_stream, out_file = open_compressed(
|
||||||
output_dir,
|
output_dir,
|
||||||
'dstat.csv',
|
'dstat.csv',
|
||||||
|
@ -222,7 +222,7 @@ def _strip(text):
|
|||||||
|
|
||||||
|
|
||||||
def _clean_details(details):
|
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()}
|
if v.as_text()}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user