From 4c6007f7b4e0f52173c946192eb9986f3b0b58b4 Mon Sep 17 00:00:00 2001 From: Paul Larson Date: Tue, 27 Aug 2024 22:37:00 -0500 Subject: [PATCH] Mount value needs to be converted to a string from Path object (#347) --- .../devices/muxpi/muxpi.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/device-connectors/src/testflinger_device_connectors/devices/muxpi/muxpi.py b/device-connectors/src/testflinger_device_connectors/devices/muxpi/muxpi.py index 45dfda86..b16559e9 100644 --- a/device-connectors/src/testflinger_device_connectors/devices/muxpi/muxpi.py +++ b/device-connectors/src/testflinger_device_connectors/devices/muxpi/muxpi.py @@ -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 @@ -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): """