Skip to content

Commit 5177df7

Browse files
authored
Merge pull request #401 from yungwine/auto-backup
do not abort restore_backup if could not create backup
2 parents d3309fe + d82c371 commit 5177df7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

modules/backups.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,11 @@ def restore_backup(self, args):
5959
else:
6060
args.pop(args.index('-y'))
6161
print('Before proceeding, mtc will create a backup of current configuration.')
62-
self.create_backup([])
62+
try:
63+
self.create_backup([])
64+
except:
65+
color_print("{red}Could not create backup{endc}")
66+
6367
ip = str(ip2int(get_own_ip()))
6468
command_args = ["-m", self.ton.local.buffer.my_work_dir, "-n", args[0], "-i", ip]
6569

0 commit comments

Comments
 (0)