From d82c371e6ae9e5bde04d82ae645519efc8c37dd8 Mon Sep 17 00:00:00 2001 From: yungwine Date: Wed, 11 Dec 2024 13:57:47 +0900 Subject: [PATCH] do not abort restore_backup if could not create backup --- modules/backups.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/backups.py b/modules/backups.py index 8ddffae2..7ed70954 100644 --- a/modules/backups.py +++ b/modules/backups.py @@ -59,7 +59,11 @@ def restore_backup(self, args): else: args.pop(args.index('-y')) print('Before proceeding, mtc will create a backup of current configuration.') - self.create_backup([]) + try: + self.create_backup([]) + except: + color_print("{red}Could not create backup{endc}") + ip = str(ip2int(get_own_ip())) command_args = ["-m", self.ton.local.buffer.my_work_dir, "-n", args[0], "-i", ip]