Skip to content

Commit

Permalink
Mount value needs to be converted to a string from Path object (#347)
Browse files Browse the repository at this point in the history
  • Loading branch information
plars authored Aug 28, 2024
1 parent 5a2e4dc commit 4c6007f
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -367,10 +367,12 @@ def remote_mount(self):
for dev, mount in mount_list:
try:
self._run_control(
"sudo mkdir -p {}".format(shlex.quote(mount))
"sudo mkdir -p {}".format(shlex.quote(str(mount)))
)
self._run_control(
"sudo mount /dev/{} {}".format(dev, shlex.quote(mount))
"sudo mount /dev/{} {}".format(
dev, shlex.quote(str(mount))
)
)
except Exception:
# If unmountable or any other error, go on to the next one
Expand All @@ -380,7 +382,9 @@ def remote_mount(self):
yield self.mount_point
finally:
for _, mount in mount_list:
self._run_control("sudo umount {}".format(shlex.quote(mount)))
self._run_control(
"sudo umount {}".format(shlex.quote(str(mount)))
)

def hardreset(self):
"""
Expand Down

0 comments on commit 4c6007f

Please sign in to comment.