summaryrefslogtreecommitdiff
path: root/lbup
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2023-10-08 18:44:15 +0200
committerAnton Khirnov <anton@khirnov.net>2023-10-08 18:44:42 +0200
commit115c94aeaa0c1a5a99b895b58c1640bfb8b4e7e8 (patch)
treed1662867fa48119d1c1c893479f8dec4f311d1e2 /lbup
parent6945dbec12d43f15dfe9a9050c845d38bde3c8e4 (diff)
targets: always pass dirs/excludes as iterable-of-str to _do_save()
This is cleaner.
Diffstat (limited to 'lbup')
-rw-r--r--lbup/targets.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/lbup/targets.py b/lbup/targets.py
index 877f3d7..55702ee 100644
--- a/lbup/targets.py
+++ b/lbup/targets.py
@@ -131,8 +131,8 @@ class Target(ABC):
# index
cmd = bup_exec + ['index', '--update', '--one-file-system'] + index_opts
- cmd.extend(['--exclude=%s' % str(e) for e in excludes])
- cmd.extend(map(str, dirs))
+ cmd.extend(['--exclude=%s' % e for e in excludes])
+ cmd.extend(dirs)
if dry_run:
self._logger.debug('Not executing index command: ' + str(cmd))
@@ -380,8 +380,8 @@ class TargetSSHLVM(TargetSSH):
save_opts = ['--graft=%s=%s' % (snapshot_mount, mountpoint)]
index_opts = ['--no-check-device']
reparent = (mountpoint, AbsPath(snapshot_mount))
- dirs = [d.reparent(*reparent) for d in dirs]
- excludes = [d.reparent(*reparent) for d in excludes]
+ dirs = [str(d.reparent(*reparent)) for d in dirs]
+ excludes = [str(d.reparent(*reparent)) for d in excludes]
stack.enter_context(self._mount_snapshot(conn_root, devnum, snapshot_mount, fstype))