From d293e02b7f27b838effbc7abee5184335749b86c Mon Sep 17 00:00:00 2001 From: Ankit R Gadiya Date: Fri, 12 Nov 2021 18:42:51 +0530 Subject: [PATCH] fix(device): convert PosixPath to str (#1) The is_remote_path utility function returns `PosixPath` class, but the functions later expect a string as parameter. This commit adds the `as_posix()` call which converts the class into a `str` fixing this bug. --- riocli/device/util.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/riocli/device/util.py b/riocli/device/util.py index 633b8043..0a9a5de9 100644 --- a/riocli/device/util.py +++ b/riocli/device/util.py @@ -115,9 +115,9 @@ def is_remote_path(src, devices=[]): parts = src.split(":") if len(parts) == 2: if is_valid_uuid(parts[0]): - return parts[0], Path(parts[1]).absolute() + return parts[0], Path(parts[1]).absolute().as_posix() else: for device in devices: if device.name == parts[0]: - return device.uuid, Path(parts[1]).absolute() + return device.uuid, Path(parts[1]).absolute().as_posix() return None, src