fix: Not use binary string in subprocess command

This commit is contained in:
roondar 2023-03-08 17:55:55 +01:00 committed by GitHub
parent caf3e8ee23
commit 7e4e5f4462
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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