Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tendrl/node_agent/node_sync/disk_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def get_disk_details():
cmd = cmd_utils.Command('hwinfo --disk')
out, err, rc = cmd.run()
if not err:
out = out.encode('utf8')
out = unicode(out, errors="ignore").encode('utf8')
for all_disks in out.split('\n\n'):
devlist = {"disk_id": "",
"hardware_id": "",
Expand Down Expand Up @@ -256,7 +256,7 @@ def get_node_block_devices(disks_map):
cmd = cmd_utils.Command(lsblk)
out, err, rc = cmd.run()
if not err:
out = out.encode('utf8')
out = unicode(out, errors="ignore").encode('utf8')
devlist = map(
lambda line: dict(zip(keys, line.split(' '))),
out.splitlines())
Expand Down Expand Up @@ -345,7 +345,7 @@ def get_raw_reference():
cmd = cmd_utils.Command("ls -l %s" % full_path)
out, err, rc = cmd.run()
if not err:
out = out.encode('utf8')
out = unicode(out, errors="ignore").encode('utf8')
count = 0
for line in out.split('\n'):
if count == 0:
Expand Down