Skip to content

Commit 34cf446

Browse files
committed
fix download_archive_blocks --only-master
1 parent 6d0fe1f commit 34cf446

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

mytonctrl/mytonctrl.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ def about(local, ton, args):
192192
from modules import get_mode, get_mode_settings
193193
if len(args) != 1:
194194
color_print("{red}Bad args. Usage:{endc} about <mode_name>")
195+
return
195196
mode_name = args[0]
196197
mode = get_mode(mode_name)
197198
if mode is None:
@@ -1134,10 +1135,11 @@ def download_archive_blocks(local, args: list):
11341135
color_print("{red}Bad args. Usage:{endc} download_archive_blocks [ton_storage_api_port] <download_path> <from_block_seqno> [to_block_seqno] [--only-master]")
11351136
return
11361137

1137-
only_master = pop_arg_from_args(args, '--only-master')
1138+
only_master = '--only-master' in args
1139+
args.remove('--only-master') if only_master else None
11381140
api_port = None
11391141
if args[0].isdigit():
1140-
api_port = args.pop(0)
1142+
api_port = int(args.pop(0))
11411143
path = pathlib.Path(args[0])
11421144
from_block = args[1]
11431145
to_block = args[2] if len(args) >= 3 else None

0 commit comments

Comments
 (0)