fix: Not use binary string in subprocess command

This commit is contained in:
roondar 2023-03-08 17:55:55 +01:00 committed by Simon Fonteneau
parent caf3e8ee23
commit b9a3ad755a

View File

@ -785,7 +785,7 @@ class backup_generic(ABC):
self.logger.info('[%s] removing directory "%s"',self.backup_name,oldbackup_location)
if not self.dry_run:
if self.type =="rsync+btrfs+ssh" or self.type == "rsync+btrfs":
cmd = "/bin/btrfs subvolume delete %s"%oldbackup_location.encode('ascii')
cmd = "/bin/btrfs subvolume delete %s"%oldbackup_location
process = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, close_fds=True)
log = monitor_stdout(process,'',self)
returncode = process.returncode