1
0
mirror of https://github.com/ARM-software/devlib.git synced 2025-09-01 09:31:53 +01:00

target: Make Target.push/pull work with pathlib

Convert paths to str() so that passing a pathlib.Path works.
This commit is contained in:
Douglas Raillard
2021-08-10 17:32:09 +01:00
committed by Marc Bonnici
parent dd7860d477
commit 9c8624833e

View File

@@ -485,6 +485,9 @@ class Target(object):
@call_conn
def push(self, source, dest, as_root=False, timeout=None, globbing=False): # pylint: disable=arguments-differ
source = str(source)
dest = str(dest)
sources = glob.glob(source) if globbing else [source]
self._prepare_xfer('push', sources, dest)
@@ -541,6 +544,9 @@ class Target(object):
@call_conn
def pull(self, source, dest, as_root=False, timeout=None, globbing=False): # pylint: disable=arguments-differ
source = str(source)
dest = str(dest)
if globbing:
sources = self._expand_glob(source, as_root=as_root)
else: