From af6834cfd018706f0a932241cfc8beb1ba20e9ff Mon Sep 17 00:00:00 2001 From: Kevin Froman Date: Mon, 10 Jun 2019 23:21:44 -0500 Subject: [PATCH] added missing secrets import --- onionr/communicatorutils/connectnewpeers.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/onionr/communicatorutils/connectnewpeers.py b/onionr/communicatorutils/connectnewpeers.py index 43e91c9a..ca71d310 100644 --- a/onionr/communicatorutils/connectnewpeers.py +++ b/onionr/communicatorutils/connectnewpeers.py @@ -20,6 +20,11 @@ import time import onionrexceptions, logger, onionrpeers from utils import networkmerger +# secrets module was added into standard lib in 3.6+ +if sys.version_info[0] == 3 and sys.version_info[1] < 6: + from dependencies import secrets +elif sys.version_info[0] == 3 and sys.version_info[1] >= 6: + import secrets def connect_new_peer_to_communicator(comm_inst, peer='', useBootstrap=False): config = comm_inst._core.config retData = False