feat(backup): allow no auth

pull/35/head
Houkime 2023-02-03 18:03:13 +00:00 committed by Inex Code
parent 45ab9423b9
commit e5a965ea29
1 changed files with 9 additions and 2 deletions

View File

@ -15,8 +15,15 @@ class ResticBackuper(AbstractBackuper):
def rclone_args(self):
return "rclone.args=serve restic --stdio" + self.backend_rclone_args()
def backend_rclone_args(self, account: str, key: str):
return f"{self.login_flag} {account} {self.key_flag} {key}"
def backend_rclone_args(self, account: str, key: str) -> str:
acc_arg = ""
key_arg = ""
if account != "":
acc_arg = f"{self.login_flag} {account}"
if key != "":
key_arg = f"{self.key_flag} {key}"
return f"{acc_arg} {key_arg}"
def restic_command(self, account: str, key: str, *args):
return [