Skip to content

Commit

Permalink
Bug fix: Proper list mount points for NFS storage pools
Browse files Browse the repository at this point in the history
Read file as string so there is no need to decode it afterwards.

Signed-off-by: Aline Manera <[email protected]>
  • Loading branch information
alinefm committed Jan 10, 2020
1 parent 960b0d1 commit 0402b42
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion model/libvirtstoragepool.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def prepare(self, conn):
rollback.prependDefer(run_command, umount_cmd, cmd_timeout)
except TimeoutExpired:
raise InvalidParameter('KCHPOOL0012E', {'path': export_path})
with open('/proc/mounts', 'rb') as f:
with open('/proc/mounts', 'r') as f:
rawMounts = f.read()
output_items = ['dev_path', 'mnt_point', 'type']
mounts = parse_cmd_output(rawMounts, output_items)
Expand Down

0 comments on commit 0402b42

Please sign in to comment.