From eec8c356ad6676142bb137e81273fd916b132637 Mon Sep 17 00:00:00 2001 From: Kevin Froman Date: Thu, 22 Oct 2020 15:16:19 +0000 Subject: [PATCH] fix systemrandom shuffle --- src/utils/netutils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/netutils.py b/src/utils/netutils.py index 8d428b04..677d89b0 100755 --- a/src/utils/netutils.py +++ b/src/utils/netutils.py @@ -25,9 +25,9 @@ from .readstatic import read_static def check_network(torPort=0) -> bool: """Check if we are connected to the internet (through Tor).""" success = False - connect_urls = [] try: - connect_urls = SystemRandom().shuffle(read_static('connect-check.txt').split(',')) + connect_urls = read_static('connect-check.txt').split(',') + SystemRandom().shuffle(connect_urls) for url in connect_urls: if basicrequests.do_get_request(