Fix flake8 issue that slinked in.

This commit is contained in:
Anton Hvornum 2022-08-12 18:11:27 +02:00
parent a78f7d193b
commit 7b06da280d
No known key found for this signature in database
GPG Key ID: F1234C5BA67C59DF
1 changed files with 2 additions and 1 deletions

View File

@ -1131,7 +1131,8 @@ class Installer:
return SysCommand(f"/usr/bin/arch-chroot {self.target} sh -c \"chsh -s {shell} {user}\"").exit_code == 0
def chown(self, owner :str, path :str, options :List[str] = []) -> bool:
return SysCommand(f"/usr/bin/arch-chroot {self.target} sh -c 'chown {' '.join(options)} {owner} {path.repalce('\'', '\\\'')}'").exit_code == 0
cleaned_path = path.repalce('\'', '\\\'')
return SysCommand(f"/usr/bin/arch-chroot {self.target} sh -c 'chown {' '.join(options)} {owner} {cleaned_path}'").exit_code == 0
def create_file(self, filename :str, owner :Optional[str] = None) -> InstallationFile:
return InstallationFile(self, filename, owner)