It's no secret that we need a random number!

This commit is contained in:
David Dalcino
2022-02-27 14:31:34 -08:00
parent 96af3eb393
commit 2c5c261592

View File

@@ -25,7 +25,7 @@ import json
import logging.config
import os
import posixpath
import random
import secrets
import sys
import xml.etree.ElementTree as ElementTree
from logging import getLogger
@@ -144,7 +144,7 @@ def retry_on_errors(action: Callable[[], any], acceptable_errors: Tuple, num_ret
def retry_on_bad_connection(function: Callable[[str], any], base_url: str):
logger = getLogger("aqt.helper")
fallback_url = random.choice(Settings.fallbacks)
fallback_url = secrets.choice(Settings.fallbacks)
try:
return function(base_url)
except ArchiveConnectionError: