From 20fa7bd85237276232410f8d282a69a74fde4b39 Mon Sep 17 00:00:00 2001 From: Alex Grintsvayg Date: Sat, 21 Dec 2019 13:48:07 -0500 Subject: [PATCH] better server range for boris --- lbry/scripts/wallet_server_monitor.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lbry/scripts/wallet_server_monitor.py b/lbry/scripts/wallet_server_monitor.py index 3e8eaada5..b440a7eb7 100644 --- a/lbry/scripts/wallet_server_monitor.py +++ b/lbry/scripts/wallet_server_monitor.py @@ -285,14 +285,14 @@ def get_dsn(args): def get_servers(args): - if '..' in args.server_range: - start, end = args.server_range.split('..') - else: - start = end = args.server_range - return [ - args.server_url.format(i) - for i in range(int(start), int(end)+1) - ] + servers = [] + for s in args.server_range.split(","): + if '..' in s: + start, end = s.split('..') + servers.extend(range(int(start), int(end)+1)) + else: + servers.append(int(s)) + return [args.server_url.format(i) for i in servers] def get_slack_client(args):